This is a common fault with all laptops. The ribbon cable connecting the laptop to the screen passes through the hinge and sometimes snags as it does so, pulling the connector off partially at the screen end.
If you catch it early enough, even spraying a little WD40 into the hinge can cure it.
Sometimes the connector, which is only stuck on, can be pushed back into place simply by working the screen backkwards and forwards a few times which is what has evidently happened to yours.