A fresh VPS accepts SSH on port 22 and otherwise blocks unsolicited traffic. Open only the ports your applications actually need.
1. Connect to the server over SSH.
2. List the current firewall rules and note which ports are already open.
3. Allow the port your application listens on, for example 80 or 443 for a web server.
4. Test from another machine before assuming the rule worked.
A port that is open in the firewall still needs a service listening on it. If a connection fails, check both. Keep management ports restricted to addresses you trust.