This is usually a problem with one of the motors, gears or a bad stepper motor. Sometimes this is caused by paper that's stuck in the gears somewhere.
Check for a paper jam and see if it's anything obvious like a paper jam. If it is, clear the jam and see it comes back. If it doesn't you should be fine.
If the issue comes back, I would suggest buying a new printer and recycling this one. Internal issues with printers are generally not worth fixing. If you want to keep it around to scan, then you can use it for that but you need to remember that the printer's print mechanism is damaged and can no longer be used. A thermal label will probably suffice.
Leave the inks in there, since you have a HP printer. This is needed to use the printer's non printing scan modes, outside of being a standalone style scanner and giving up the on printer scanning features. These modes do not work without ink cartridges installed at a minimum, even if they are empty.