Team Sonic Racing is available on Switch, and it does let you play online. If you're looking to play in a team with friends, that situation is going to involve a TON of luck.
On PS4/XB1, Team Sonic Racing uses the party/invite systems of the hardware. On Switch, without that hardware-level system available, SEGA opted to not offer anything. The only way to play online with friends is by hopping in a lobby and hoping everyone lines up correctly. Teams are broken into colors (Blue, Red, Yellow, and Green), and three players are on each team. The first person in a lobby goes to the Blue team, next goes to Green, the next Red, and the next Yellow. In other words, if you want people on your Blue team, you'll have to have the fantastic luck of joining first, then having your friends join in 5th and 9th.
Hopefully this is something that can be fixed, as there are numerous other games on Switch that offer up their own solutions to the party/invite system. To think that SEGA/Sumo Digital just ignored it altogether for this version is pretty disappointing.