That .22 Short rimfire answer applies to the USA. But did you mean the first ever? Anywhere?
There were rimfires and pinfires in Europe before the the .22 rimfire was "invented' in the US. I cannot say how much design crossed the water to be used in patenting the rimfire in the US. I also can't say how much design crossed the water to be used by Mr White in patenting the bored-through cylinder in the US.
Pinfire ammo was made in the US since both sides of the American Civil War used the guns from Europe. I have not heard of anybody in the US trying to patent the pinfire.
The metallic cartridge has a metal case, a primer, powder, and a bullet. We all assumed you meant the first metallic cartridge. There were various cartridges that had 2 of those 4, or 3 of those 4, prior to the .22 Short rimfire.
Bart Noir