Hi,
Alternatively, if the router supports it, could you try WPS (Wi-Fi Protected Setup) instead?
http://h10032.www1.hp.com/ctg/Manual/c02106007.pdf#d0e3145enww
This does not seem to be an AirPrint model. Do you have printer drivers compatible with macOS 12 Monterey? The HP support site appears to have drivers for older Mac operating system versions only. If necessary, you may want to check whether the HP 5.1.1 Printer Software Update download from Apple could be used (in spite of the system requirements). Look for something like the HP Photosmart D110 series version 3.3.2 driver listed in Printer and scanner drivers for Mac - Apple Support. This would be entirely experimental, and may not work at all. Make sure that you have backup copies of all important files (documents, photos, et cetera) before testing anything.
Add a printer to your printer list so you can use it on Mac – Apple Support (UK)
Reset the printing system on your Mac to solve a problem – Apple Support (UK)