What type of gamepad are you using? Only XInput controllers are compatible, so if you are using a Dualshock or other non-XInput controller, you will need to use Steam or another utility like DS4Windows to make them work with XInput.
Which OS are you using? If you are using an XInput-compatible gamepad on MacOS it should work but I have seen issues there in the past so if that’s what you’re using, I could take a look.