Which version of (e.g., Windows 10, Windows 11) are you running? Are you trying to connect via USB cable or Bluetooth ?
Turn off "Allow the computer to turn off this device to save power" in Bluetooth properties.
Windows 10 and 11 can automatically find and install generic gamepad drivers: