You can host through Microsoft, using a service called Minecraft Realms, but the license agreement also entitles you to host your own server using whatever infrastructure you like, with certain restrictions on content and monetization (most notably, you aren't supposed to include things like gambling and lootboxes using real-world money or MTX currency that can be purchased with real money).
I'm all for piracy, but hosting your own Minecraft server isn't even piracy, it's explicitly allowed!