UPDATE 2 - The information was true. You cannot play online with friends. Here's the full statement.
As the game is now, you cannot create friend lobbies online. You can only play online with randoms. You can still get friends together and play with local play, and you're free to play with 4 players on one Switch system. You can also still challenge friends to your creations, and take on their designs through Course ID and having them follow your maker profile.
Nintendo has also stated that you cannot mix local and online players to fill out gaps. In other words, you can't take two local players online, and then have two random online players fill out your team of four.
UPDATE - There's conflicting information out there about online multiplayer. We've reached out to Nintendo for further comment and clarification.
The addition of online multiplayer in Super Mario Maker 2 comes with a major caveat according to a Nintendo representative at a press event last week: you can only play with random players online, whether you’re seeking out co-op or competitive play. The only way to play multiplayer specifically with friends is through one system or local wireless play.
Nintendo’s reasoning is that, with global leaderboards, the matchmaking for competitive play would be compromised if you could play with friends. That limitation also extends to co-op play as well despite those not being leaderboard driven.