If you are considering buying your first firearm the first question you should ask is: "What is the purpose for this firearm?" If you can answer this question you will be able to narrow your choices. For example, if your first purchase is for conceal carry your obvious choice will be a handgun. If you're only going to be hunting with your first firearm a bolt-action rifle is appropriate. However, if the firearm will be used for home defense then your option will be more diverse. A handgun will certainly be a viable choice for home defense, as will a shotgun or a semi-automatic rifle, such as an AR15. One can certainly defend oneself with a bolt-action hunting rifle with a long range scope, but will that be the best choice for hone defense? Your environment and state laws will also play a part in your decision. If the place of residence is an apartment building with neighbors all around, then maybe a high-powered semi-automatic rifle may not be the best choice for home defense. In this case, over-penetration of a round can rip through many walls and possibly hit innocent bystanders. Even a 9mm FMJ round can penetrate many dry walls which means even choosing the right ammunition is also important in choosing your self defense firearm.
Additionally, you want to purchase a firearm that fits your shooting ability and physical ability. A friend of mine is a Federal Air Marshall and carries a Glock 32 chambered in .357 Sig. To those who are new to firearms, a .357 Sig is a powerful round with a lot of recoil. He took his wife shooting and used his duty pistol to teach her. She has never shot a gun in her life and was scared of guns so what do you think happened when she shot this powerful round? Tears flowed and she never wanted to go shooting again. As an instructor, I use a .22 LR caliber firearm for those who have never handled an firearm. Is a .22 LR a viable choice for self-defense? Not in my book; my general rule is never use any caliber smaller than a 9mm. However, .22 LR is great for building confidence and fundamental skills in training.
In terms of physical ability there are things to consider such as grip size for handguns. Stature for handling a 12 gauge shotgun. The elderly may not have the dexterity to rack the slide for a semi-automatic handgun so a revolver may be a better choice.