start with the RetroPie image from retropie.org.uk/download. It's a tested and mostly stock Raspbian image and the best baseline system to start experimenting.
make sure you have an adequate power supply and you don't get any under-voltage warnings.
test if the device is detected by the OS by running a few command line utilities
# see what USB devices are connected with
# see what input devices are detected by the OS and what kind (gamepad/keyboard/mouse/etc.)
test if the device inputs are registered in the system by running a few joystick/gamepad testing programs fromt the command line that capture the button/joypad/d-pad presses and show them on the terminal:
# 1st joystick
# 2nd joystick
# another testing utility
I was using 9zip to unzip the image and it wasn't unzipping the entire image file for some reason. Decided to, as an experiment, use winrar instead and I noticed the image file was a different size - I'd not even thought to check this.