Because of the ubuntu 22.04 using Wayland, many VNC software cannot work properly. I have tried RealVNC, but the server does not work. TeamViewer works fine, but if you try to control the server alone remotely, it is impossible because you have to click yes and agree to share your desktop on the server. The easy access function of TeamViewer does not work with Wayland.
The Ubuntu 22. 04 also has a built-in desktop share in the setting, however, it still needs you to click agree in the server which is quite stupid.
The only solution is to disable Wayland and use Xorg but it is too complex and I give up.
Then I switch the system to Deepin, everything works fine.