The Garand community (I know, not handguns) says" if it slides, grease it, if it rotates, oil it". Not bad advice to follow.
I used to grease the slides on my semi-auto handgun slides/frames but found that the carrier fluid would evaporate (or some fact simile) over time and the clay left behind from the grease would gum up the gun.
So, for hand guns that I do not shoot much, I put a film of oil on them before storage and then lubricate them again before I shoot them. Guns in regular use, get lubricated and the lubrication lasts until the next cleaning.
Rifles, like the Garands, again, they are lubricated before being place in storage, but I wipe them down and lubricate them appropriately before shooting them.