I understand you are getting ink cartridge error on your printer.
Don't worry I'd like to help you out.
Did you make any changes to your printer?
Have you tried checking with a different ink cartridge?
Please provide the operating system you are running on your PC to assist you better.
Try Cleaning the electrical contacts on the ink cartridge and check if it helps.
Please try the steps recommended below.
Turn the printer on, if it is not already on.
Wait until the printer is idle and silent before you continue.
With the printer turned on, disconnect the power cord from the rear of the printer.
Unplug the power cord from the wall outlet.
Wait at least 60 seconds.
Plug the power cord back into the wall outlet.
HP recommends connecting the printer power cord directly to the wall outlet.
Reconnect the power cord to the rear of the printer.
Turn on the printer, if it does not automatically turn on.
The printer might go through a warm-up period. The printer lights might flash, and the carriage might move.
Wait until the warm-up period finishes and your printer is idle and silent before you proceed.
Refer this article to further troubleshoot ink cartridge issues.