And maybe it's time to think about getting my first firearm.
First off -- abandon any idea of using rock salt -- pissing off an intruder is only going to get you killed.
Since you'd be new to firearm ownership, let me give you my armchair opinion.
Get a pump action 12 gauge shotgun, and a bunch of 00 buckshot. Hornady makes a gimmicky "Zombie Max" 12 gauge shell, and while it's gimmicky, Hornady makes some damn good ammo (I carry the critical defense hollowpoints in my everyday carry gun, a Springfield XDS chambered in .45 ACP). Don't waste time with bird shot, rock salt, or any other "less lethal" method.
As far as brands -- Remington, Mossberg -- won't go wrong with either one of those.
Finally, buy a box of cheap #8 birdshot and head to a range. One common misconception of a shotgun is that you don't have to aim it, it's a "room broom" -- and that notion is complete horseshit. Yes, the shot will expand but that pattern, especially indoors, and with 8 pellets (00 buck) it's not going to expand that much as to preclude you from aiming it.
Now -- some armchair "experts" will tell you never to cock it as a warning. I disagree with this -- one of my best friends is an officer, and she told me that 95% of the time, cocking a shotgun is enough and you don't have to pull the trigger -- and the other 5% of the time, you're going to have to pull the trigger because the assailant is going to kill everyone in the house.
If you'd rather have a handgun -- get a Glock in .45 ACP, with the highest magazine capacity that your moonbat idiot leaders in Kaliforniastan will let you have. I have a Glock 21 in .45 ACP, and let me tell you -- it's a nail driver. Extremely accurate at the range, and I get a 3 inch grouping at 50 yards with it.
But whatever you get -- practice, practice, practice. And have fun. No such thing as a bad day at the range. Keep the gun clean and the ammo dry and it will last you for decades.