I understand you replaced the cartridge on your printer and you are getting incorrect cartridge error.
Don't worry I'd love to help you out.
Are you using HP original ink cartridges or refilled ink cartridge?
Please try the steps recommended below.
Resetting the printer can resolve some ink cartridge errors.
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 Errors.