https://en.wikipedia.org/wiki/Virtual_Network_Computing#:~:text=VNC%20by%20default%20uses
%20TCP,Java%2Denabled%20web%2Dbrowser.
VNC by default uses TCP port 5900+N,[6][7] where N is the display number (usually :0 for a physical
display). Several implementations also start a basic HTTP server on port 5800+N to provide a VNC
viewer as a Java applet, allowing easy connection through any Java-enabled web-browser. Different
port assignments can be used as long as both client and server are configured accordingly. A HTML5
VNC client implementation for modern browsers (no plugins required) exists too.[8]
The default port a VNC Client uses to connect is TCP 5901. This port corresponds to the first display
number (:1) of the VNC server. Each display number has its own port number, starting from 5900. For
example, display :2 uses port 5902, display :3 uses port 5903, and so on. The user can specify a
different
port
number
if
needed.
Reference:
https://documentation.suse.com/sles/15SP3/html/SLES-all/sec-vnc-connect.html