I had the same issue, and it turned out to be caused by having multiple accounts logged into Xcode. Some of these accounts were unnecessary. Once I removed the extra accounts from Xcode > Settings > Accounts, the team dropdown populated correctly. If you're facing this, try cleaning up the accounts and keeping only the ones you actually need.