"Ghost touching" is a problem that occurs when the iPhone's touchscreen responds to touches or swipes that were not made by the user, and it can be caused by a variety of issues. Here are some steps you can take to troubleshoot and fix the problem:
Clean the screen: The first step is to make sure the screen is clean and free of any debris. Use a microfiber cloth to wipe the screen gently, and avoid using any harsh cleaning chemicals that could damage the screen.
Remove the case: If you're using a case on your iPhone, try removing it to see if that resolves the issue. Some cases can interfere with the touchscreen's sensitivity and cause ghost touching.
Update software: Make sure your iPhone is running the latest version of iOS. Software updates often include bug fixes that could resolve the issue.
Restart the iPhone: Restarting your iPhone can sometimes clear up software glitches that are causing the ghost touching.
Reset all settings: If the problem persists, try resetting all settings on your iPhone. Go to Settings > General > Reset > Reset All Settings. This will not delete any of your data, but it will reset all of your iPhone's settings to their default values.
Restore the iPhone: If none of the above steps work, you may need to restore your iPhone to its factory settings. Make sure to backup all of your important data before doing so. You can restore your iPhone by connecting it to a computer with iTunes and following the prompts to restore it to factory settings.
If the issue still persists after trying all these steps, it may be a hardware issue and you should take your iPhone to an Apple Store or an authorized repair center for further assistance