Below is the failure report generated by the code you posted, minus your PC's serial number.
Failure ID Tag Checksum HP Serial Number Test Date Failure Code Device Includes Error Message
M4PUQM-8GNAL5-GXGK6K-60VJ03 | OK | 8CG0000000 | 5/13/21 | 303 | Storage | Floppy Drive, Hard Drive, Memory Drive, Optical Drive, SCSI, Tape Drive | Hard Disk 1 Quick Test Failure |
You will need to install a new hard drive, and reinstall the operating system.
Below is the link to the service manual, where you can find the hard drive removal and replacement procedure.
HP Envy x360 m6 Convertible PC (model numbers m6 through ar0XX) Maintenance and Service Guide
You may want to consider replacing the 2.5" mechanical hard drive with a better performing 2.5" solid state drive (SSD).
After you replace the drive, use another Windows PC running W7 64 bit or newer to create a bootable USB recovery drive with the HP cloud recovery tool that will reinstall W10, the drivers and the software that originally came with your notebook.
Here is an info link for how to use that utility...
HP Consumer PCs - Using the HP Cloud Recovery Tool (Windows 10, 7) | HP® Customer Support