Go to Settings > Apps and then click on the Xbox App. Click on Advanced and then click on Reset or Repair. Close the app, relaunch and check if you can install the Xbox Game Pass Games on Windows PC.