It depends on a couple of factors. First and foremost how big is your data collection likely to get are we talking thousands of UIDs or Millions? If you are not worried about the scale if your project then trying to find the smallest container (a large integer) then you are much more worried about being able to scale with changes.
So now you need to choose VarChar of a reasonable size which will take any format of UID and be happy- this includes leading zeros and bigInt which is easier to sanitise for but unfriendly to leading zeros and letters.
If you know that the UID is always a non-leading zero or zero padded number then you can get slightly better security by sanitising by way of casting to type. That and size are all the benefits of bigInt.
VarChar has the downfall of size - you need to know the biggest UID length before you start but leading zeros, letters and other unexpected content can be handled with the small exception that you are now cleaning a string.
From a programming point of view it makes very little odds as a UID is just a label that is unique. With an index on it I should not imagine that there is any speed difference in MySQL at least not with the common engines it might be using.
So best is simply a product of what you need most from the data.