sidearm, n: a weapon worn at the side.
(Does not distinguish from an arm growing out of your abdomen.)
Doesn't really say much. Often, a sidearm is carried when a larger, more capable weapon would be unwieldy or socially awkward. In the olden days, a sidearm could often be a dagger or a Bowie knife, or a stiletto for a Lady. Such a blade would often be a tool with uses other than as a self defense weapon, for example to skin an animal that you just brought down with a larger weapon. These days, the term is often assumed to be a firearm, either a pistol or a revolver.
Militarily, a sidearm is often carried by an officer, while the cannon fodder carry a long gun (these days, a rifle, previously a musket). Even after firearms became routine, an officer would carry a sword ceremonially, while earlier the sword of an officer or a gentleman would be there for use in combat. A sidearm, then and now, would be used in a single execution in the field.
In terms of firearms, while handguns are generally more convenient to carry and quicker to bring into action, they are less accurate at a longer distance (say, 30 feet or more) than a rifle, which also generally is more powerful, even when using the same cartridge. (Logistically, it is efficient to have a pistol/revolver and a rifle that do share a caliber.) Hence the saying, you use your handgun to fight your way back to your rifle. That is not so much the case in the military, but in a situation where you're being attacked away from your house, where your rifles stand ready if you can get to them.
Side Quest 2024