This would be better asked on SuperUser, as it's about technology features rather than anything lifehack related, but most of the HP printers I've worked with have an option to Restrict Color in the settings menu of the device, or within the web site that the printer runs. Most HP devices, particularly those that are intended for office or commercial use, run a web site that admins can use to change printer settings remotely. To use it you'll need to find the IP address of the printer. A good place to look for this would be your network router admin panel - they usually have a list somewhere of all the IP addresses they've handed out, and sometimes the name of the device they've handed it out to. If there is no device name, they should at least have something that says which MAC address is associated with an IP address, and every device int he world has a unique MAC address, which should be written on the device serial number label. If you find neither of these things, it's time to scan your network using some software - I usually use Softperfect Network Scanner 6.2.1 (the last version that was freeware) but there are plenty of tools of this type - and discover the printer's IP that way
Here's the instructions for a related family - https://support.hp.com/hr-en/document/c04558136 - see if you can follow them for your HP printer's web site
Here's a video of someone using some HP printer's built-in-web-server to restrict color: https://www.youtube.com/watch?v=fjCDWpcq0J8
The phrase to google for is typically "restrict color"