Read books. Like, a lot of them.
Start with Make It Stick (Brown et al.). Apply what this book teaches you to every one afterwards.
Next, read and work through Exercises for Programmers (Hogan) and A Common Sense Guide to Data Structures and Algorithms (Wengrow).
After you finish those two, read The Missing README (Riccomini et al.) and Extreme Programming Explained (Beck et al.). These two books provide very different viewpoints into the stuff that isn’t coding in a programming job.
Assuming you’re using an OO language, follow that up with Object-Oriented Analysis and Design with Applications (Booch et al.) and Object Thinking. They contrast each other quite a bit; having both perspectives is handy.
Once you’re through all those, I recommend Tidy First (Beck), Implementation Patterns (Beck), and Test-Driven Development By Example (Beck). These three books of his provide an incredibly accessible view into better ways to code.
If you’re anything like me you get bored reading one book for too long. I’ve found that having a second book going that I can switch to is great for that. A parallel track with The Pattern On the Stone (Hillis), The Pragmatic Programmer (Thomas & Hunt), The Mythical Man-Month (Brooks), and How Computers Really Work (Justice) provides a reprieve and some technical and cultural context.