When you buy a house there is no way of knowing who might have a key to the front door. Maybe the babysitter has one and the next door neighbor too.
Right after the closing is a great time to have the locks changed. Not only will the home be more secure but lock technology has changed. In general, locks are better and easier to use than they were in the 1940’s.
Also, consider smart locks with keyless and blue tooth options. Unlock doors with your phone or with a code. If you think you forgot to lock the door you can lock it from a remote location.
Locks are complicated. Do some research before you buy.