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)

crwdns2893858:0crwdne2893858:0 crwdns2893862:0crwdne2893862:0

crwdns2894050:0crwdne2894050:0

crwdns2889612:0crwdne2889612:0 0
crwdns2892346:0crwdne2892346:0