With firearms, as is with most things, it depends on the use. Some firearms require grease, while other require oil. Most do not call out by name, a specific brand of oil to use, or a weight.
-CZ for instance specifically calls for Ballistol in many of their manuals, both semi auto and bolt actions.
-MIL-G-46003 was the spec for the M1 Garand, Lubriplate 130A, which is the correct lube for the bolt and roller.
-Kalashnikov rifles required an "Alkali solution" and "lubricating oil"
-M-16 rifles today require "CLP" in the regular army.
Semi-auto firearms for example, while operating on many of the same principles, do better or worse with grease or oil or both, depending on the operating conditions, ammo, temperature, contamination, etc.
Some semi-autos will get "slowed" by thicker grease, even in warm temps, while other seemingly do not care about the oil.
Typically I use a combination of the two, grease and oil.....grease at the areas from which will see higher temps and forces, and oil in the pins and springs.
There is no right or wrong answer to the question.
Some guns are picky, I would argue that the AK for example likes grease, as it is very violent, as do rifles like the M1 Garand, from which the AK and some others were derived.
While some like Glock pistols, require only light oil.
Pump shotguns, really dont require either.
Shooting corrosive ammo can change the "requirement" for lube also. Which is why the old Soviet manual call for an Alkali solution.
All in all, with exception to the AR, and any delayed roller lockback system, (which require "wet operation") a light coating of oil on pins and springs, and a light grease in locking and sliding surfaces is sufficient for the life of the gun.