If a plug and play automatic setup screen like the one shown below is displayed when you connect the usb cable click close or cancel to close it.
Hp printer usb cable not recognized.
Push the windows r keys.
Possible solution 1 the other possible solutions are to try a different usb cable if you have one lying around.
If u are not regularly used the printer make sure you place it on clean place to make sure the printer not being a dust factory.
Clean the usb port in both ways.
Find the usb device it may have a yellow exclamation mark next to it select update driver software then choose browse my computer for driver software and let me pick from a list of available drivers on.
If not just buy a new cheap usb cable from amazon.
Go down the list until you see universal serial bus controller and click the plus icon to expand.
To resolve this issue disconnect the device wait approximately 20 seconds then reconnect the device to cause the device to display in the safely remove hardware window.
Remove dust clean your printer regularly to make sure for long term used.
Update the full feature printer software using this link.
Connect the usb cable to the printer only when the software prompts you to connect while installing the drivers.
If your printer does not come with a usb cable you will need to provide your own cable separately.
Type devmgmt msc in the box to prompt the device manager to open.
A to b a to micro b a to mini b or a to a.
Let me know how it goes.
Refer this article to further troubleshoot printer not found during network driver setup.
The usb device might not display if it was stopped previously and not disconnected from the usb port.
Make sure that the usb cable you use has the following mark.