A firearm, for most people, is the most effective means to defend themselves against another aggressor. That doesn't mean that it's the right call for everyone.
You're right though, training is necessary "table stakes" and I hope that's not what you're going to sacrifice if you purchase. At the very least, go to an outdoor range and get some amount of practice in so that you can handle your firearm safely.
Also, you need to make the decision up front that you're willing to defend yourself with deadly force. Some people can't or are unwilling to do so. This is a far more consequential decision than most people realize. Without training, practice and the will to use it a firearm is simply a liability.
Some other thoughts:
1. Consider getting a medical kit and keeping it on hand. You're far more likely to use it and Stop the Bleed classes are free. It won't cost much to keep on hand
2. Get Concealed Carry Insurance. You'll need legal representation in the case of defending your life.
3. Realize that after you take a life, you'll likely need counseling. Prepare accordingly