Spawn definition

I have a question, is it possible to make different character spawns (example, there are two groups, group B and group A. group B spawns on the left bank, group A spawns on the right bank, division into teams so that the player can choose his group and spawn either in A or B, depending on the choice.

Not with just the vanilla tools available to players. I believe there’s plugins that allow for this.