The strike plate should be moved until it is perfectly aligned with the latch. Then the door will close correctly. Strike plates should be removed before installing new ones. A sharp chisel hammer should be used to enlarge the mortise.
If the latch still doesn't work after adjusting the strike plate, there's something else wrong with your door. You may need to replace the entire door assembly, but first, try some of the following fixes.
Older doors can sag at the hinges when gravity pulls them down. You can try tightening them to get your door back on the straight and narrow, but you may also need to replace them with slightly longer screws to provide more support.
You can also use a hammer to loosen the old screws. Drive the head of the hammer into the screw until it pops out. Then remove the screw and drive another one in its place. Repeat this process for all the screws.
Remove the door from the frame by lifting the door off the track. Unscrew the two hinge pins on each side of the door. Slide the new pins into their respective holes. Screw the pins back into place. Replace the door on the frame.