Green & Brown Fields
I've been reading more about "green fields" and "brown fields." I think it's a perfect analogue to coding.
If you're not familiar with the terms, green fields are undeveloped landscapes - they are for you to shape as you like. Conversely, brown fields are lands that have already been developed. Perhaps there is construction that needs to be torn down, perhaps the ground has absorbed years of chemicals, perhaps it will take more concrete to build a strong foundation. Brown fields are, in this sense, challenges.
When we're new coders, the temptation is to throw out the old and build new. "It'll be faster if I start from scratch." (I don't think it only applies to coders either. If you've ever needed a plumber, or some handy work done, you'll find most are critical of the work that preceded them.)
The truth is often you can't scrap everything. And even if you could, tossing it all away creates a lot of risk and pressure on you.
Instead start by improving the brown field by being selective, and being iterative. Find the high impact areas, where the code smells are. Sort by those that are low effort, low risk.
Not only does it allow you to easily measure your improvements to show positive progress, but it also allows you to leverage many of the lessons learned from previous builders.