If you are having an issue printing with MacOS Mojave 10.14.x and Catalina 10.15.x please do the following:
http://ftp.hp.com/pub/softlib/software12/HP_Quick_Start/osx/Installations/Essentials/hp-printer-essentials-S-5_15_5_12.pkg
2) After the software is installed your print drivers will be updated (this will take a couple of minutes to download)
For additional info please review: https://h30434.www3.hp.com/t5/Printers-Knowledge-Base/quot-HPxxxxx-framework-quot-will-damage-your-computer-quot/ta-p/7825233
Additional Notes:
If you have an older HP home printer you should delete it, install https://support.apple.com/kb/dl1888?locale=en_US and then add the printer with the airprint driver if possible