Hi,
To begin with, it may be a good idea to reset the printing system. Does the operating system offer a suitable driver to use?
Reset the Mac printing system to solve a problem - Apple Support
Add a printer on Mac - Apple Support
If necessary, you could try the Dec 11, 2020 HP Printer Drivers v5.1 for macOS (https://support.apple.com/kb/DL1888?viewlocale=en_US&locale=en_US) package download from Apple. Look for something like the HP Deskjet Ink Advantage 2520hc All-in-One version 2.3.2 driver mentioned in the Printer and scanner drivers for Mac - Apple Support article.
Also, there is an HP Easy Admin tool for Mac that allows administrators to download drivers without a connected printer. If there is a problem with HP Easy Start or HP Smart, you may want to try this tool.
https://support.hp.com/us-en/document/c06164609
When testing drivers, there may be software conflicts. Make sure that you have backup copies of all important files (documents, photos, et cetera).