Depends on the existing finish. Depends on the rifle.
I’ve built a few Garands. The raw Walnut stock is best served with boiled Linseed oil, though many prefer Tung oil. That was correct for the rifle and the period. The “Boiled” means that drying agents have been added. The oil cures IN the wood, not on top, so excess oil is detrimental and leaves a gummy mess.
For restoring/maintaining a Garand - 3/4 parts boiled linseed oil with 1/4 part turpentine to clean it. You can use raw linseed oil (sold as Flax oil, marketed as a nutritional supplement at Whole Foods) in the mix, but you have to be careful to wipe off the excess and not use it often as it takes a long time to dry.
For a rifle with varnish - wipe it down with a soft, clean (or damp) cloth. Nothing more is required to maintain varnish. Folks like Lemon oil (furniture cleaner) and that works, too. If a varnish finish is bad, it’s hard to repair, and in general, you’re looking at stripping and refinishing. This will destroy the collector value on many vintage rifles, but for a run of the mill rifle with a varnish finish, careful work can make it look great.
For most vintage military rifles - Linseed oil mix above.
For a Swiss K-31, that depends on what is already on the rifle - some still had the oil/beeswax/vinegar (not making that up) finish, but some were re-done by the military (or the Reservists, hard to know) with Shellac.
Shellac is different than varnish. Varnish cures, and that’s it. So, subsequent layers of varnish have to be applied before the underlying layer has fully cured, or the underlying layer has to be sanded, for the next layer to bond correctly. Shellac is dissolved in alcohol and the subsequent layer dissolves the one below it. New layers of Shellac can be added anytime, and they bond without preparation like sanding. Super easy to repair. Also, easily damaged by spilled drinks…
So, for a Shellac finish on a rifle, a bit of fresh shellac.
Hope this helps.