If your iPhone screen is frozen or won’t respond to touches, a force restart usually fixes it without losing data.
1. iPhone 8, SE (2nd gen) and later
Press and release Volume Up, press and release Volume Down, then press and hold the side button until the Apple logo appears.
2. iPhone 7 and 7 Plus
Press and hold Volume Down and the Sleep/Wake button together until the Apple logo appears.
3. iPhone 6s and earlier
Press and hold the Home button and the Sleep/Wake button together until the Apple logo appears.
4. If it keeps freezing
Update iOS, free up storage and remove recently installed apps. If it still freezes, back up and contact Apple Support.