If your iPhone or iPad isn’t responding and you can’t turn it off and on, try forcing it to restart. Note that this will not delete any data.
For iPads & iPhone X models and newer:
Step 1. Quickly press and release the volume up button.
Step 2. Quickly press and release the volume down button.
Step 3. Press and hold the side button until the Apple logo appears, and then release. (The screen will temporarily go black as the iPhone/iPad shuts down and reboots.)
Step 4. Keep holding the button until you see the Apple logo.