It'd help if you provided some details about your printer and how you have connected to it.
- Are you using ethernet cable to connect
- Are you using Wi-fi
- Are you using a Virtual USB port
If you have an inoperable port this could be because of a firewall blocking the port, or a loose connection to either the printer or computer [ if using an ethernet cable ].
There were some updates last year that affect HP printers and computers. What build of Windows 10 are you currently on?
The HP website for your particular printer also has some driver and firmware updates, along with some tips on how to remove any updates that may have affected your printer connections. You may want to take a look there first.
Regards,
Regedit32