I don't claim to be an expert, but the Beretta M9 series has undergone a few design changes since it's introduction in 1985. It typically has a magazine designed to carry 15 or 17 rounds. In 2021 the latest version, the M9A4, came with an 18 round magazine and some other upgrades. They do make some extended magazines (20, 30, 32, & 35 round) but these are not conducive to carrying the firearm.