HP 5.1.1 Printer Software Update - Apple Support
Earlier reports indicate that the use of an HP LaserJet 1022 driver from that package is possible with an HP LaserJet 1020 printer as well. However, the text says Not compatible with macOS v12 and newer, so do not expect a download to work with macOS Sequoia 15 without modifications. If the package will not install, various solutions have been suggested for HP LaserJet P1005 and other models (community search), but the success rate is somewhat unclear.
If a compatible HP driver for macOS 15 cannot be found, or if another software solution is not possible, you may have to look for a workaround.
Linux drivers are available.
https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index
If nothing else helps, you may want to investigate whether an inexpensive Linux-based Raspberry Pi print server could make a USB-connected HP LaserJet 1020 or 1022 act as if it were an AirPrint printer, in order to allow network printing from a modern Mac or an iPhone/iPad. Look upon this as an experiment.
Details about how to set up such a Raspberry Pi print server (for an AirPrint-like USB connection to a Kyocera laser printer) can be found in the posts by Techguyuk in Can’t print with iPadOS17 - Apple Community.
Also, Tesserax reported about using a Raspberry Pi 3 Model B+ for an old HP LaserJet printer (in Can I connect my laser printer to my netw… - Apple Community).