phone think on/off button is pressed

Hi, my phone (a redmi note 8) keep turning on/off when I put my finger above the turning button, but I don't press it, dk what is happening, tried restarting it some times but keep happening, can someone help me?

(btw, sorry about some english errors)

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0