Don’t forget about training. Get extra mags, ear protection, and some basic gear for the range. Spend money on ammo and classes to really get comfortable with your gun.
If you’re staying under $500, consider the PSA Dagger (a Glock clone) or the Canik TP9. Both offer good value and decent performance.
If this is just for occasional use, consider a revolver. They’re reliable and simple to operate. A snub-nose .357 magnum is a great choice, and you can use .38 special rounds for less recoil.