Greetings,
Welcome to the forum.
I am not a HP employee.
You need to replace the HDD ASAP.
You may have to remove the existing HDD and internally connect this drive to a different PC as a SATA data drive or use a SATA to USB adapter to connect to a external USB port on a different PC.
No guarantees if you can recover data using either method. Data recovery depends on the condition of the bad HDD.
Enabling Legacy support was a good trouble shooting option but I think you have HDD failure.
Regards