It's not uncommon to have sensor issues on a phone, and it's not often a huge problem to fix. The first thing to do is to power down the device and then power it back up again and see if that resets the sensor. If not, you may need to calibrate it.
You can also try to clean the screen with a microfiber cloth. If the problem persists then you should check the sensitivity of the screen. If the problem persists then you have to clean the screen sensor with a cotton swab.