My iPhone's screen is not working well?

I have an iPhone 5s (old ik) and once in a while the top half of my screen will not work and it will do weird stuff, like if i'm typing, it will type random letters and its really frustrating. The only way i can fix it is if i turn off my phone and I do not want to keep doing that because i feel like it is not good for the phone. Also, when i tap very hard on the top when it doesn't work, when i let go, there's like some sort of sound that makes it sound like my screen is coming off, i also do not have a screen protector on. And idea on what it could be?

TOUCH SCREEN BECOMES DEFECTIVE AFTER IT FACED SO MUCH PUNISHMENT TOUCHING BY YOU FROM THE PAST.