I need some help on this please

How do i make it so that after a certain amount of players are on a team it locks out the rest of people becaus eright now people are only spawning in on one team which i dont want.

Go into the map settings, click on the teams tab, and change it to be like this:

You can change the team size to what you want.

Thank you very much lollol