Is there some command to randomize teams automatically, or do I just have to use some iterator loop?
To answer your question:
There is no pre-made function from roblox to randomize teams. As mentioned by Perci1 in the comments, you will need to manually make the logic, then use a loop to go through each player and assign either Team1 or Team2.