Several users said this can be very helpful if the proximity detector for iPhone doesn't function. Hold press and then release the Volume Up button. Then hold and release the Volume Down button. At last, press and hold the side button for about 10 seconds till your iPhone 14/13/12/11 restarts to a normal state