Is there a way to connect to a remote server that uses DHCP to connect to a router that also recieves its ip address dynamically, or does VNC only work with static ip’s ?

VNC will work with any sort of TCP/IP addressing as long as you get the packets to the right place. So it will work fine with DHCP but you will need to have a DNS entry that can be resolved to the VNC server.

If part of what you are doing involves connecting across the internet to a machine behind a router whose ISP does not give you a static address then
I suggest you investigate DDNS services like to get a “Dynamic DNS” entry that will reconfigure itself when your subnet get’s a new address.