People don't realise quite how old a lot of guns in use today are.
The Browning M1919 .30 machine gun was introduced in 1919 and has been used ever since.
The M2 .50 machine gun in use by NATO (and I'm guessing Ukraine) has been in service since 1933.
The DShK which is the Soviet equivelant, since 1938.
I believe the oldest rifle still in active service is the Mosin Nagant 1891 which has shown up in Ukraine as a designated marksman rifle on both sides of the conflict.
The fact of the matter is there is only really a few different operating systems for automatic guns which are reliable and don't require an external power source:
Simple blowback - The act of firing the gun causes the cartridge case to be rammed out of the rear of the chamber, cycling the bolt. - Various sub-machine guns. Small caliber pistols.
Delayed blowback - Same as above but with some form of delaying mechanism to allow pressure to drop in the chamber before the gun cycles - HK MP5, Famas, many others
Short-stroke gas operated - The exhaust gasses are used to move a piston a short distance that causes the action to cycle using the momentum of the bolt - AR15 and others
Long-stroke gas operated - As above but the piston moves the full length of the cycle and is usually part of the bolt carrier - AK models
Short-recoil operated - The recoil of the barrel causes the action to cycle - M2 .50 and others
There are of course many weapons that use external electrical or hydraulic power to run the action. Think gatling-style guns such as the Minigun, and chain guns like that on the AH64 Apache helicopter.