I would like to know the following information to assist you better:
Is the printer slow while printing documents and while copying also?
If the printer copies fast and is slow only while scanning then try to scan using another application and check.
Did any hardware changes take place on the printer?
Meanwhile, I did some research and suggest you to perform the following steps:
Disconnect the power cable from the printer while the printer is still ON.
Disconnect any other cables if connected the printer.
Press and hold the printer’s power button for 15 seconds.
The printer should be directly connected to the wall outlet and not to a surge protector. Reconnect the power cable to print and the printer should power ON by itself. If the printer doesn’t power ON then please manually power it ON.
Now try to scan a document and observe the scanner bulb which is underneath the glass bed. Once you close the lid, the light will indicate how fast the bulb is moving. If the bulb is slow then you may perform a firmware update on your printer. Refer to the document HP Printers - Updating or Upgrading Printer Firmware for help.
Keep me posted.
Please click “Accepted Solution” if you feel my post solved your issue, it will help others find the solution. Click the “Kudos/Thumbs Up" on the bottom right to say “Thanks” for helping!
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".