I think you're misinterpreting error messages you are seeing. Is it saying something about needing to install an operating system?
If so, that means that the file system on your drive has become so corrupted that the boot loader no longer can see the OS to boot it, so it presumes is is gone -- when in fact, it is still there, but corrupted.
This issue is often due to a failing drive. So, let's check that first, because if it is failing, it would need to be replaced and there is no point then in doing anything else until we confirm that.
If not, to check the drive you have to follow these steps: 1) Press Esc key repeatedly, several times a second, while rebooting the laptop. Do NOT hold the key down, just press it over and over. 2) Eventually, you will see an HP Startup Menu 3) Press the Function key for testing the hard drive (usually F2) and let it run. If the drive checks out OK, then report that and I can provide you options for reinstalling Windows on your PC.
***If my post helped, click the thumbs-up symbol to say thanks***
***Please mark Accept As Solution if my post solved your problem***
I am a volunteer and I do not work for, nor represent, HP
Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".