Make sure the cable is directly connected between the Mac and the printer.
The use of a USB hub is not recommended.
Also, make sure the cable is connected to a USB 2.0 port on your Mac. Do you have an Anti-virus/firewall installed on the Mac? If yes, disable the same for time being.
You may check this in System Information > Applications. • Check if the printer is getting recognized by your Mac:
1. From the Apple menu, choose About This Mac
2. Click System Report.
3. Under the Hardware heading on the left side of the System Information window, click USB. USB 3 devices appear under USB 3.0 Bus, and USB 2 devices appear under USB 2.0 Bus. The printer should be under the USB 2.0 Bus
Uninstall HP Easy Start
Click on Spotlight icon and type HP Uninstaller or by opening HP Easy Start.
Click on Continue to uninstall the software.
When prompted for Password, type in your system password
Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".