If your printer has a control panel, go to the Preferences, as indicated in the previous step and see if there is a cleaning option. In this case, run the app and see if this helps the alignment. Cartridge replacement if all the above steps failed, try replacing the ink cartridges.
Those that are low on ink get stuck and can’t release the ink, causing problems that misalign your printer. This should be the last option, as replacing cartridges can be expensive.