Open versus closed is a useful clue.
A lock that operates easily with the door open but catches when closed may be affected by how the door meets the frame. That observation helps explain the problem. It doesn't establish the repair by itself.
The key may not be the only worn part.
A bent key, worn cylinder, loose handle and reluctant latch need different checks. If a spare works differently, keep both keys available. Avoid making repeated copies of a key that is already giving trouble.
Repair what can be repaired.
A loose fitting doesn't automatically call for a new lock. Equally, damaged parts may not be worth keeping. Ask which component is at fault, what the proposed work addresses and whether the rest of the hardware remains suitable.
Check the door in normal use.
Once work is complete, close the door as you normally would. Test the latch, bolt and handle without relying on the old trick. Include the inside turn as well as the outside key.
Does it happen with the door open too?
Which side moves, and when did it start?
Keep any pieces and avoid pushing them farther in.
