A theory: Take all the realms for selection. Distribute all the players in a balanced way between all the realms.
In the game, everyone is randomly in a realm, just as everyone who creates a new character is randomly distributed in one of the realms.
But in The game, if you were in a different realm from your friend’s realm and you didn’t see him, like Shadowlands, you can enter his realm by inviting him (realm wide) and you can do dungeon raid and any other normal work with him.
Blizzard, all realms have the same population and don’t suffer from problems like lag etc.