New and unrun engines are tough to store for extended periods of time. As has been suggested, unbolt the rocker arms so there is no tension on the valve springs and insure the cylinders are sufficiently oiled down. Be sure the spark plugs are in place and tightened. Remove the carburetor and put a plate over the intake opening to seal the top side of the engine from air. Oil the tops of the valves in the exhaust ports and bolt flat plates over the ports is also recommended along with storing the engine in a moisture free area that’s temperature controlled.
For engines that are in a position to crank and run, Napa makes an aerosol called ‘The Fogger’ that you simply spray into the carburetor while it’s running and lubes up the insides while spraying enough fogger into the engine in which to stall it. If it’s just a core engine awaiting a rebuild and it’s going to be awhile, another option is to just fill up the crankcase and carburetor with used oil but if the engine has leaky rear or front seals, be prepared for some seepage.