Hello there mate! I was able to ask this same question before
Let me tell you how I figured it out before. So here's what I did, I clicked PROFILE from the tabs at the upper left corner of the webpage. Once you're on your profile you can see Profile Info once again at the upper left corner of the webpage then click Show Posts. Once you've clicked that, you can see all the posts you created and the comments you've made. Now on the URL bar you can see something like this (
https://bitcointalk.org/index.php?action=profile;u=1659347;sa=showPosts). You see those numbers after u= ? That is going to be your UID. Also, if you want the whole link to your profile. You can follow the same steps, but once you're in Show Posts page, you click one of the posts or comments you've made and you'll be routed to that page once again. Then you can see your name on where you commented, it's gonna be colored blue, click your bitcointalk name and you'll be routed to your own profile but this time you will see (
https://bitcointalk.org/index.php?action=profile;u=1659347) instead of (
https://bitcointalk.org/index.php?action=profile) and once again, the numbers at the end is your UID.
And the fastest way to get it is through Clicking PROFILE then under Modify Profile you can see Forum Profile Information, once you click that you'll see something like (
https://bitcointalk.org/index.php?action=profile;u=1659347;sa=forumProfile).
Hope this helps mate! Good luck