Maybe the issue is with the configuration on the printer itself and it has nothing to do with macOS at all. Here is one post where the user found a security setting within the printer's own configuration menus accessed through the printer's own web management interface, but should also be accessible from the printer's own LCD menu panel on the printer itself.
"Hold for Authentication" When Trying to Print from a Mac… - Apple Community
Otherwise you did not provide enough information & details.
What is the exact model of your Mac and version of macOS involved? You can get this information by clicking the Apple menu and selecting "About This Mac".
What is the exact model of your HP printer?
What drivers did configure when Adding this printer? HP drivers, or AirPrint, or something else?
How is the printer connected? Directly to the computer with a USB cable? If so, are you using a USB-C to USB-A adapter, dock, hub? If so make & model?
Is this your own home personal printer or one from your employer or school?
Has this printer ever worked with this particular Mac? If so, what has changed since the last time it worked?
Does this printer work with any other computer, OS, or device (phone or tablet)?