There actually are SaaS providers who lease off-the-shelf relay server solutions to you. Photon or Playfab, for example. How much custom server-sided logic you can implement on those solutions depends on the product. But as usual with other people's software running on other people's servers (or "the cloud" how the marketing people call it): There are limits to how much you can customize them, and when you need to exceed these limits, you are out of luck.
But you can of course also develop your own relay server application from scratch. That way it's your decision where you want to place it on the sliding scale between a dumb relay and authoritative gameserver.
The most simple solution would be a relay which just forwards network messages without even looking at them. This is quick to develop and inexpensive to host, but very insecure when it comes to cheat prevention.
The other extreme would be a a full-fledged authoritative gameserver which checks every single incoming messages for whether or not that player can do that right now, calculates all game mechanics server-sided, and sends out the results of these calculations to only those client which are supposed to know about them. When you do this properly, then its very design makes any cheat impossible except for purely client-sided automation. But creating a server like that takes a lot of time, adds a lot of complexity to your network stack and makes your server computationally expensive, which drives up your hosting cost (but might actually reduce your network traffic cost due to server-sided censoring of hidden information).
Most online multiplayer games are somewhere between those two extremes.