There thounsand of tutorials on Internet. Here is some:
How to Install HP Printer in Ubuntu 18.04
http://ubuntuhandbook.org/index.php/2018/12/hplip-3-18-12-released-ubuntu-18-04-support/
http://ubuntuhandbook.org/index.php/2018/04/hplip-3-18-4-released-ubuntu-18-04-support/
How to install latest HPLIP on my Ubuntu to support my HP printer and/or scanner?
...
All of them suggest to clean, uninstall, download official drivers and manually build drivers in different ways. Which of them should I follow?
All tutorials are about to install unstable, but latest version of the driver. This question is about how to configure stable version which is already installed in Ubuntu. Difference between preinstalled stable and latest version is little and is not worth to replace.