First check here if your device is listed for a Cloud Recovery of your OS
What you need is a USB drive of minimum 16Gb, and the serial number of the HP device.
Download the tool :
Follow these steps, to create the W10 USB bootable flash drive installer.
Select Download tool now, and select Run.
If you agree to the license terms, select Accept.
On the What do you want to do? page, select Create installation media for another PC, and then select Next.
Select the language, edition, and architecture (64-bit or 32-bit) for Windows 10. You want 64 bit.
Select which media you want to use:
USB flash drive. Plug in a blank USB flash drive with at least 8GB of space. Any content on the flash drive will be deleted.
Once Finished you see that OS installation and drivers (Optional) on the bootable pen drive.
1. Delete WIM’s
After completion it leave a copy of the WIM files on your %localappdata% Directory.
So best delete it afterwards, because it is a lot of GB’s waste…
Now that you have the bootable USB drive you can install the OS on your device.
2. BIOS Changes
It might be necessary to disable SECURE BOOT in the BIOS,
in order to start the computer using recovery media.
1. Go to System configuration / Boot Options
2. Use the down arrow key to select Secure Boot, press Enter,
and then use the down arrow key to modify the setting to Disable and press Enter.
3. Use the arrow keys to select Legacy Support and press Enter,
and then use the arrow keys to modify the setting to Enable and press Enter.
4. Press F10 to accept the changes and exit or use the left arrow key to select the Exit,
use the down arrow key to select Exit Saving Changes and then press Enter to select Yes.
5. The Computer Setup Utility closes and the Operating System Boot Mode Change screen displays,
prompting you to confirm the Boot Options change. Type the code shown on the screen,
and then press Enter to confirm the change.
6. The Computer Setup Utility closes and the computer restarts.
7. Turn the computer off and try to boot from the Recovery media.