Hi:
The error code reported, Hard disk 1 quick test failure, means you need to buy a new hard drive and reinstall the operating system.
Below is the link to the service guide where you can find the hard drive removal and replacement procedure.
http://h10032.www1.hp.com/ctg/Manual/c05149586
After you replace the drive, you can reinstall W10 for free as follows...
With a 32 GB USB flash drive and the HP cloud recovery tool, you can make a bootable recovery drive that will reinstall W10, the drivers and the software that originally came with the PC.
You will need to have access to another Windows PC to create the installation media.
Here is an info link for how to use that utility...
https://support.hp.com/us-en/document/c06162205