Hi,
You may have to replace the camera's back cover case,
Here is a link to just one [https://www.ebay.ie/itm/Original-Grey-Rear-Back-Cover-Case-LCD-Screen-for-Nikon-D5200-DSLR-Repair-Part/252848244421?hash=item3adeee06c5:g:xggAAOSwH-daHjK2|supplier]. It is not a recommendation to use them. It is shown t give an idea of the cost of the part. There are others available online that may suit you better.
Here is a link to the ifixit [guide|50939] guide to help you with the repair/replacement (if this is what you decide to do). You only need to go to Step 7. in the guide.
Hopefully this is of some help