With the printer turned on, unplug the power cord from the rear of the printer.
Lift the carriage latch, slightly lift the printhead, lower the printhead back into the carriage, wiggle the printhead left and right, and then lower the carriage latch to lock the printhead into place.
Close the cartridge access door.
Reconnect the power cord to the rear of the printer.
Wait for the printer to start, and then look for the error.
You can refer this HP support community for more assistance:- Click here
I hope that helps.
To thank me for my efforts to help you, please mark my post as an accepted solution so that it benefits several others.