Greetings,
Welcome to the forum.
I am not a HP employee.
Your first option is to run HP Diagnostics (Link).
Tap "ESC" at boot. select "F2", run System Tests.
The second option may require replacing the HDD and reinstalling the operating system.
I hope you have data backups.
Recovering the existing operating system and data recovery would be easy if you have made operating system disk image backups on external media.
Regards