Does Game Mode or third-party software disable the Windows key?
Certain gaming programs (Razer Synapse and Xbox Game Bar are two examples) disable the Windows key so players won’t trigger it by accident. Go to the Game Mode settings (by pressing Windows + G) or turn off any third-party settings that change keyboard settings. Using other tools, you may also block the key by mistake—search for any malicious programs using Windows Defender or Malwarebytes.

For more read - https://datarecovee.com/windows-key-not-working/