Try looking at what the GamepadID expression returns when connecting different types of controllers. Mind that these strings will not be just be "Xbox" or "PS4". Likely they will be more cryptic, but if you connect different types of controllers you should be able to find a pattern.
Ideally try connecting as many different types as possible, Xbox 360, Xbox One, Series S, Series X, PS2, PS3, PS5 anything you can get your hands on. Likely wired and wireless will yield different results. If you do that you will be able to better handle what ever is connected.