Let’s start by connecting to your Raspberry Pi/RetroPie either by SSH or just plug a keyboard and hit F4 to go directly to the Terminal.
Check if your USB controller is detected by:
lsusb
Mine is “Arduino SA Leonardo”.
Next, enter the following command to test the inputs:
jstest /dev/input/js0
Now press each of the configured button inputs and you should get a response.