Go with a .38/.357 revolver. Ideally one without a saftey. The problem I have with safeties is that it can give you a false sense of security. Without a saftey, you are forced to follow basic gun rules. i.e. if you want to make a revolver safe, you need to take the ammo out of it, making it impossible to fire. With a lever saftey, you may or may not have a round chambered and ready to go as soon as that saftey is switched off.
For self defense, the revolver is the best. You simply store it with ammo in the cylinder and you know with 100% confidence that if someone breaks into your home or confront you on the street, all you need to do is point and pull and it will fire, there's no ensuring the magazine is seated and a round is chambered and the saftey is off. When you are under stress, you will be wishing the gun in your hand was as simple as a revolver.
With the .38/.357 you can also shoot the more affordable and softer shooting .38 special rounds at the range and save the expensive and powerful .357 rounds for self defense (and a few at the range to know how much recoil to expect). If you ever start reloading, .38/.357 is a great gun to reload for because the revolver is easy on the brass and when you reload .38 special its not a big deal if you put too much powder in because the gun can handle the muc more powerful .357 magnum rounds anyway.
Another good choice is a glock, a little more complicated but the saftey is in the trigger so its not a separate thing to worry about and like a revolver, to make a glock safe you actually have to make it safe by clearing the chamber.
There's a reason if you look at accidental gunshot reports, you rarely see revolvers or bolt action rifles despite the fact that they are the most common guns owned by civilians, the accidents happen with the more complicated guns, ironically often with guns that have incorporate more modern "saftey" features. Gun saftey is most effective when you keep things simple.