Yes, the Quest2 when connected to a PC via Oculus Link will work just fine for windows PC VR builds (and for the Unity Editor).
First make sure you're running Oculus Home on the PC. Connect the Quest2 to the PC using the Link cable (or similar, compatible USB3 cable). Put on the Quest and you should see a prompt asking whether you want to 'Enable Oculus Link' Click the blue Enable button and Oculus Home (the PC version) will open in the headset. You're good to go. PC builds when run will open in the HMD, and if you're in the Editor, going into Play mode will also display your VR environment.
ps. if you accidentally close the 'Enable Oculus Link' prompt, you'll also see it as an option in your Quest menu under Quick Settings