Unfortunately this sounds like an hardware issue.
You have two options:
1. If the device under warranty you should ask a replacement device
2. If there’s no warranty anymore, you can try to remove the top cover then check the ribbon cable connection between the screen and main board (most likely this cable is loose)
We are sorry for the inconvenience