Firstly, make sure that your controller is connected to your PC or console. It's worth trying to restart the controller or switching the connection type from wireless to cable or vice versa.
For Steam users:
A thing worth trying is enabling controller configuration support on Steam. I can't guarantee it helps every problem, but often it's a good first step. Steam -> Settings -> Controller -> General Controller settings -> Enable the one that matches your controller (or all).
For non-Steam PC users:
If using a third-party controller it's worth looking into using an emulator like https://www.x360ce.com/, this fools the game into thinking that you have an official Xbox controller.