Many environments also include native virtual display support so you don't even always need a special VNC server. On Linux projects like that tend to just automate it but sometimes it's pretty easily to do manually. E.g. on Sway you just define the virtual display the exact same manner as you do a physical display and then VNC in to only that display. On other operating systems like if it was running native macOS projects tend to do more of the heavy lifting around making the virtual displays actually happen.