I had the same issue with HP Officejet 6600.
Services : go to print spooler and restart the service for the printer to work
go to Windows Image Aquisition for the scanner to work restart the service
this has to be done every time after shutting down the computer.
this worked for me.
I just opened an account on this forum only to reply to this thread as it was the only place I found a solution that actually helped me and worked. The others just say check drivers, turn on, turn off, Enable Fax and Scanner, blah blah blah blah....
My device is a 2007 HP Officejet 5700. Despite its age it has always worked well and I use it as a scanner. Everything was fine until I upgraded to W11. Since then whenever I try to scan, I connect the USB cable, the PC recognizes it, it appears as an available printer/scanner but when I try to scan I get a warning "
No scanners were detected...".

Let me thank you and complement the contribution of
@adbc with the steps to restart the
Windows Image Acquisition (WIA) service:
Press the
Windows Key + R and type in
services.msc and press enter.
Scroll down to
Windows Image Acquisition (WIA), right-click and choose
Restart. You can also first
Stop and then
Start.
If the Windows Image Acquisition service is not running, a reboot is worth a try now.