I’m sorry to hear that you’re experiencing this problem. Typically, the iPhone uses a proximity sensor to disable the screen when it’s held up to your face during a call. It sounds like your proximity sensor may not be working correctly.
Here are a few steps to try and resolve the issue:
1. Restart Your iPhone: Sometimes, a simple restart can fix minor glitches.
2. Clean Your Phone: Make sure there’s no dirt, dust, or debris covering the proximity sensor, which is located at the top of your iPhone next to the front camera.
3. Remove Your Phone Case or Screen Protector: If you have a case or screen protector on your iPhone, it might be obstructing the proximity sensor. Try removing it to see if that helps.
4. Reset All Settings: Go to Settings > General > Transfer or Reset iPhone > Reset > Reset All Settings. This will reset all settings on your iPhone back to factory defaults. Please note that this will not delete any data, but things like your wallpaper, display settings, and Wi-Fi passwords will be reset.
5. Update iOS: Check if there is a software update available for your iPhone. Go to Settings > General > Software Update.
If you’ve tried these steps and you’re still experiencing the problem, it’s possible that there’s a hardware issue with the proximity sensor. In this case, I recommend that you contact Apple Support or take your iPhone to an Apple Store for further assistance.