This generally happens due to the waste ink getting behind the contacts on the printer, or a failed printhead. Generally speaking if the printhead has an electrical issue, the printer is better off scrapped due to the risk of used printheads having the same issue and new ones being way too expensive. Sometimes you can clean them and get it back to a working state, but not every single time. Consumer grade printers like this tend to be disposable and poorly made, so if you break it don't sweat it - it's usually a underlying issue the repair attempt exposed.
I had one until the touchscreen had an issue, so you can see how to clean it here. It fixed mine and it was close enough to 100% I never noticed additional issues but you may never fix it 100% if it's severely clogged - you may only be able to recover 90% of the original print quality for example.
WARNING: Make sure you follow my instructions on the bypass correctly, or you’ll waste A LOT OF INK! 1/4 (HP 564 XL) or 1/2 (HP 564 standard). If you aren’t sure if you can do it, buy a “burner” set of ink.