Diagnosis
This is almost always caused by grease and food debris buildup in the door latch mechanism or on the sealing surfaces, not a broken part.
How to Fix It
Unplug the oven and let it cool. 1) Open the door fully and look at the latch hook on the door itself and the slot it fits into on the oven body. 2) Use a cotton swab dipped in warm, soapy water or a degreaser to meticulously clean all gunk out of both the hook and the receiver slot. 3) Wipe down the entire rubber door gasket around the opening. 4) Dry everything thoroughly. After cleaning, open and close the door gently a few times to work the latch.
If That Didn't Work
The door might be slightly misaligned. Check if the hinges on the left side are loose. If you see screws, you can try gently tightening them with a screwdriver while supporting the door. Don't overtighten.
Heads Up
Never force or slam the door. If the latch isn't engaging cleanly, forcing it can bend the metal hook or crack the plastic housing. A door that doesn't seal properly will let heat escape and mess with your cooking times.