I'm not a big fan of a rifle or shotgun for home defense. I have my own reasons for stating such, and I've addressed it in past posts.
As far as recoil goes, a 9mm pistol isn't all that bad. I only have one Glock, and that's a 21C, which is a .45acp. I don't know Glocks well enough to be able to determine caliber by model number.
You didn't mention a revolver, so I won't address those calibers, brands, or model numbers.
It would be of help if you gave us more info. as to your age, ability, skill level with handguns, and such. The more we know of your situation, the more we can properly respond to your questions.