What's proper way to setup logic for assigning teams to players (can also add friends) in multiplayer game

Need a logic using blueprints that will assign players a team slot (using tags) also players should be able to add friends and team up with them

I’m making a extraction based shooting game that can have upto 10 teams and 4 players in each team