Port 5900/TCP belongs to VNC (RFB protocol) for display :0; display :1 uses 5901, :2 uses 5902 and so on. macOS Screen Sharing also listens on 5900.
Do not open it to the internet. Classic VNC does not encrypt traffic and is protected only by a short password. Better use an SSH tunnel: ssh -L 5901:localhost:5900 admin@host.example.com, then point the VNC client at localhost:5901 – or use a VPN.
Typical: Connection refused because the VNC service isn't running or only listens on localhost, or a black screen because no desktop session is active on the host.
Check
nc -zv host.example.com 5900