Hi
This sort of behaviour can happen after a had aftermarket screen has been installed
To confirm this I would reattach the old screen and see if the behaviour continues
If the behaviour continues I would start to have a look at the LCD and touchscreen connectors and clean them with some isopropyl alcohol
After that it is a board level issue so if you haven’t done this sort of work before I recommend taking it to a authorised repair shop that specialises is that sort of repair
Hopefully this helps
Any questions please ask
Thanks:-)