If your iPhone is stuck and unable to turn it off, or to restart your phone to check if that will fix an issue you are having following the steps.
1. Press and quickly release the volume up button.
2. Press and quickly release the volume down button.
3. Press and hold the side button.
4. When the Apple logo appears, release the side button.