If you run into a weird glitch on your iPhone — maybe the sound won't work, or apps keep crashing, or you can't make calls — your first step should be to perform a quick restart. This will ...
If your iPhone isn't responding and you're not able to power it off and then on again, you can force restart it to hopefully fix the issue. So, here's how to force a restart on any iPhone ...
On an iPhone 7 or 7 Plus, press and hold the volume down ... the phone will soon display the Apple logo, after which it will restart itself. And likely with sensor issues fixed.