Do not disconnect the monitor, keyboard, mouse, or power cord.
Remove media from internal drives, and remove any recently added internal hardware. Disconnect all connected devices and cables such as Personal Media Drives, USB drives, printers, and faxes.Turn off the computer by pressing and holding the power button.I recommend you to perform the following steps: I read that you're trying to install Windows using the HP USB recovery media on the replacement hard drive.
I read that the option to boot from the USB is not available in the f9 boot options. I understand that you have an HP Pavilion 23-g013w All-in-One Desktop PC. I came across your post and would like to help.