First, make sure you are using the correct keyboard. If you have more than one keyboard set up (different languages) you may be using a keyboard that does not have the underscore where you expect it.
In the normal course of things, long pressing on the dash should give you a small popup with the underscore as an option. Slide your fintger to it. Alternately, tap the “.?123” key to see extra characters. There should be an underscore key there.
This is also where you will find the @ key if it’s not showing. The iPad’s keyboard is adaptive, and will ususally show things like an @ key or .com key when you are in a text field where they are required. Otherwise they are found on the second “.?123” keyboard, or the other number/symbol keyboard.
I’d show you screenshots, but my 12.9” iPad Pro keyboard has a different (more expansive) keyboard layout; and I’m not sure they keys you are looking for are in the same place.