avoid port forwarding

hi , i am a beginner and i am trying to make a multiplayer game
i want to avoid port forwarding and i don't want to use cloud services like relay
what is the best way to do it?

You can't. If by "cloud services" you mean not using any remote server.

There is a technique called UDP hole punching that allows clients to establish direct connections in most cases, but this also requires an intermediary server much like the Relay service. Since hole punching will fail for a significant number of clients, having a fallback Relay service available is effectively required if you intend to publish the game.


Why?

Unity's Relay service is easy to integrate and costs you nothing for a long while, and when you do have to pay for it you're likely making several thousands of sales.

If you're just starting out it's best to focus on the game and gaining experience in multiplayer dev, not technicalities like which services or frameworks to (not) use.