If a door doesn’t latch properly it’s usually a simple fix. You may need to simply adjust the door. Lean down until you are at eye level with your doorknob. Look at the gap between the door and the door frame. Make sure the latch is centered on the strike plate. If not, adjust as needed to get them to line up properly.