NB! It seems this console command is not compatible with CS2.
Command Profile

DZ_JOINTEAM

CS:GO

This command can make you, or another player, join a specified Danger Zone team. See argument information for help.

Syntax
dz_jointeam [Team #] [User ID / Name]

Description

This command can make you, or another player, join a specified Danger Zone team. See argument information for help.

Syntax And Arguments

dz_jointeam [Team #] [User ID / Name]
Team # The number of the team you wish to join. Specify 0 to leave your current team. If you are an admin of the server, you can make another player join this team by specifying their name or Steam ID after this number.
User ID / Name Optional, if you do not specify a user ID or name here, you will join the team with the specified ID. The Steam ID, or name, of the player you wish to make a member of the specified team.