Let's look at the solution for How do I bring my HP printer back online:-
Restart your printer by turning it off, waiting 10 seconds.
And disconnect the power cord from your printer.
Then, turn off your computer.
Connect the printer power cord to the printer and turn the printer back on.
Disconnect the power cord from your wireless router.