Regarding self defense in particular i recommend either the tool that has the least chance of backfiring critically without previous training or the tool that has the best chance of protecting you with the necessary training. From your list that would either be pepper spray or a self defense course and a gun.
I dont know how affected by your personal safety situation you are objectively and how negatively what you feel impacts your quality of life but since I generally feel self defense classes give a more positive outlook on life I recommed you take one all the same. Something reputable preferably, something with vetted professionals that have experience in fields, a "fixed establishment", a verifiable list of clients and at least several years of being in business.
The last thing you want people to scam an easy buck out of you is your personal safety. If there even exists the miniscule chance that you end up in a situation where you assess a threat wrong because some feel-good self empowerment outfit sold you the belief you can take that on and it turns out you can't there is no one you - or in the worst case your next of kin - can really hold accountable for it. The most important and life preserving parts of self defense is threat assessment and deescalation, followed by extracting yourself from that danger. Hardly ever is it about overpowering the opposition. No mere tool you buy will teach you how to do that. To know when it is more likely that a tool at your disposal will cause you harm than to give you an advantage.
Other than that, guns can be fun if handled responsibly. See if hunting is for you, get some practice at a range, there probably is no shortage of services offering that without you having to buy a gun of your own. Take that self defense class (preferably not NRA sponsored) mentioned earlier and then if you still consider a gun a good self defense choice for yourself make an informed decision.
Best of luck to you.