The games can be played alone, with other players in the same room using console controllers, or online with multiple players (who they may or may not know). Some Mario Kart games allow for in-game purchases, for items such as additional karts.
Some games on the Nintendo Switch allow voice chat for players aged 13+ using the Nintendo Switch Online smartphone app or voice or video chat on Switch 2 consoles using GameChat (there may be a fee and parental approval required).
Nintendo consoles (such as Nintendo Wii) provide parental controls for games such as Mario Kart and there is a Nintendo Switch Parental Controls app where parents can access additional parental controls features such as setting playtime limits. In addition, ‘Nintendo Family Group’ enables parents to set spending limits and disable friend suggestions. Additional safety settings will be available on iOS and Android if these platforms are being used to play Mario Kart games.
https://www.nintendo.com/en-gb/Games/Nintendo-Switch-2-games/Mario-Kart-World-2790000.html