Generally speaking, gun magazines are not interchangeable. Different guns use different magazines, and even different models of the same gun may use different magazines.
There are a few exceptions to this rule. Some .22 caliber rifles, for example, will accept magazines from other .22 caliber rifles. However, most rifle magazines are not interchangeable.
Likewise, most pistol magazines are not interchangeable. There are a few exceptions (most notably the Glock 17 and Glock 19), but for the most part, pistol magazines are specific to a certain model or brand of handgun.
The same is true for shotguns. Shotgun magazines are not generally interchangeable, even within the same brand of shotgun.
In short, it is best to consult your gun’s owner’s manual or manufacturer to determine which magazines are compatible with your particular gun.