Rekeying: cheaper, keeps the existing hardware
Rekeying changes the internal pins so old keys no longer work, without replacing the lock itself. Typical cost: $15–$40 per lock. This is the right call when the hardware itself is in good condition and you just need old keys invalidated — after moving into a new home, for example.
Replacement: more expensive, needed when hardware is the problem
Full lock replacement runs $50–$150+ per lock depending on the hardware quality. This makes sense when the lock itself is worn, damaged, outdated (upgrading to smart locks or higher security-grade hardware), or doesn't match your other locks.
When rekeying isn't actually an option
Not all locks can be rekeyed — some budget or older locks aren't designed for it. A locksmith can tell you quickly whether your existing hardware supports rekeying before you commit to that route.
After a move, rekey immediately — don't wait
You have no way of knowing how many keys exist for a home you've just bought or a rental you've just moved into. Rekeying (or replacing) locks in the first few days is one of the cheapest, highest-value security steps a new homeowner or renter can take.