I'd suggest you check your internal connections (inside the PC case) and make sure everything is mounted properly. However, make sure you backup all your data from the drive somewhere off-site beforehand. It is highly recommended to do so before proceeding with any hardware troubleshooting.
I'd also recommend you try using a different SATA cable with the HDD and also attempt to plug it in another SATA port on the motherboard. Afterwards, check the performance of the drive. If the issue persists, you should probably try it in another computer (if you have access to one) and monitor the HDD's behavior there.
I'd also check up on the health and SMART status using your HDD manufacturer's brand-specific diagnostic tool or a third-party alternative
Keep me posted & Good luck!