To set up > Accessibility > Switch Control > Switches.
Tap Add New Switch, then choose External, Screen, Camera, Back Tap, or Sound.
If you’re trying to add an external switch but it isn’t shown in the list, make sure it’s connected to your iPad as described above in Accessibility features for mobility on iPad