Need help giving players ids on join

I'm trying to make a datapack to that uses /trigger tp set id of player you want to tp to. But I'm not sure how I give each player a unique id on join.
Continue to help post