Cosmetic work earns its keep because it changes how a buyer perceives the whole house in the first showing, at a cost far below a structural project. A fresh coat of paint and clean flooring routinely outperform a gut renovation on return, mainly because buyers pay for a feeling of care, not for materials they will likely replace anyway.
A structural or mechanical renovation is a different calculation entirely, and it depends on urgency. A failing furnace or an unpermitted secondary suite affects financing and a home inspection, typically $400 to $600, in ways paint never will, so those issues usually need addressing regardless of how soon you plan to sell.
The right call depends on your specific house, your timeline and what a hand-reviewed walk-through actually finds, not a general rule. Get your hand-reviewed valuation from Joel Dyck.