As of this writing, Apple doesn’t provide printer drivers for HP printers on macOS 12 Monterey. However it seems that printer drivers for older macOS’s continue to work. Nonetheless Apple’s printer drivers for macOS 11 and older cannot be installed out of the box. Here is a little trick making this possible:

Download the printer drivers disk image into ~/Downloads. Then open Terminal.app and do the following:

cd ~/Downloads
hdiutil attach HewlettPackardPrinterDrivers.dmg
pkgutil --expand \
  /Volumes/HP_PrinterSupportManual/HewlettPackardPrinterDrivers.pkg \
  HewlettPackardPrinterDrivers
hdiutil eject /Volumes/HP_PrinterSupportManual

Next comes the crucial line: we replace version number 12.0 by 13.0 in the Distribution file:

sed -i '' 's/12.0/13.0/' HewlettPackardPrinterDrivers/Distribution

It remains to create and open a new installer package:

pkgutil --flatten HewlettPackardPrinterDrivers HewlettPackardPrinterDrivers12.pkg
open HewlettPackardPrinterDrivers12.pkg

Install the printer drivers as usual. Afterwards, you may want to remove all the HP related files and folders in ~/Downloads.