If iPhone isn’t responding, and you can’t turn it off and on, try forcing it to restart.
Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the side button. When the Apple logo appears, release the button.
Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the side button. When the Apple logo appears, release the button.
Press and hold both the volume down button and the Sleep/Wake button at the same time. When the Apple logo appears, release both buttons.
Press and hold both the Sleep/Wake button and the Home button at the same time. When the Apple logo appears, release both buttons.