The official documentation[0] says all Pi devices have USB OTG, but I'm not sure if there's something else about the Pi 4 and Pi Zero W that allows USB gadget mode because I've never found anyone talking about using it before recent generations of Pi. This StackExchange answer says the A and the A+ had it, but that the 2 doesn't.[1]
[0] https://www.raspberrypi.org/documentation/hardware/raspberry... [1] https://raspberrypi.stackexchange.com/questions/71613/how-to...
Those with multiple ports have a hub in between and are not capable of gadget mode.
The pi 4 is an exception, it is capable of gadget mode on its USB-C power input, not via the normal ports as there is a hub in between there too.
Thanks for the correction!