Good work.
I tried to do similarly with a HP CP1025nw (roughly 10 years old), which has become unreliable with Windows 11. But although I connected the printer to the Pi (I used a model 3B) with a USB cable, CUPS does not appear to see the "usb://....." connection string. CUPS does allow me to connect to the printer wirelessly, with a connection string that begins "dnssd://....".
So I have it working wirelessly but I was hoping to get it using USB since I suspect that would be more reliable.
I'm wondering why your Pi allows the "usb://....." method, but mine does not.
Some HP printers require proprietary firmware be loaded over USB. You could try hplip but I found that although my printer is explicitly supported it couldn't identify it via device ID.
Thanks. I have hplip installed on my Pi (version 3.21.2) and my printer is listed as being supported on the hplip support page. That page says Support Level is "Full" and Connectivity is "USB, Network". So it seems that this should work; also the printer works fine over USB to my Windows laptops.
hplip seems to provide a number of command line commands with names like hp-probe and hp-firmware. I have not been able to get any of them to work over USB though; usually they return a message "Warning: No devices found on the 'usb' bus".
Do you mean that "proprietary firmware" is needed to make the printer work with Linux?