Most endpoints that relate to a user include their user id.
For example if you have a username and want to get their ID, or if you have an OAuth token from them, you can use the Get Users endpoint https://dev.twitch.tv/docs/api/reference#get-users
Or if you’re looking for streams with the Get Streams endpoint https://dev.twitch.tv/docs/api/reference#get-streams that will also return the user id of the broadcaster.