What's the difference?
The name a person chooses to register on a Wikipedia project.
A number assigned to each username for each Wikipedia project.
A Cohort can include either Usernames or User IDs.
but not both.
Usernames and user IDs are each project-specific. A person who registers on the English Wikipedia may have a different username and user ID when they register on the Spanish Wikipedia. The user ID will usually differ even if the username is the same in both projects.