Your ability to type chat messages in-game depends on the platform you're playing on.
PC, Xbox, PlayStation: You can type freely type chat messages and read messages from other players (even if they're on a different platform).
Nintendo Switch: There is no way to type messages. If you see other people typing in chat while playing on Switch, it means they are on a different platform.