Drain the fuel and run the chainsaw dry.
Yes, drain the fuel from the tank and run the engine until it stalls from fuel starvation.
Ethanol gas turns to sticky varnish in weeks, and that’s what clogs carburetors and kills small engines. Draining the tank and then running it dry clears the carb bowl and lines. Don’t leave treated gas sitting either—stabilizer delays the decay but doesn’t stop it forever.
After that, clean the bar groove and oil holes, loosen the chain a bit, and store it hanging or on its side (not on the bar tip). If you’re storing longer than a season, pull the spark plug and squirt a little fogging oil in the cylinder, then pull the cord a few times to coat the walls. Not mandatory, but cheap insurance.
Your future self will thank you when it starts first pull next spring.