Side projects
When I am learning a new language or new framework I always try to build something where I can see if it is actually working. In the past it was mostly just small utilities to calculate easy math problems I was learning about at school. Later Android application using Java, which I re-wrote to React-Native after some time. And of course many many websites using just HTML and JavaScript, then jQuery and finally React.
But not everything is about a language. I would probably not be able to read what I did in early stages. The code was mess and I can remember I was angry with myself that the bigger the project the more problems to understand its parts I had. Maybe you know this quote:
Any fool can write code that a computer can understand. Good programmers write code that humans can understand. (Martin Fowler)
Reading about these problems and trying to figure out how to solve it brought me to topics like Clean Code, SOLID, ... You read it and it is quite clear but it takes some time to really embrace those ideas. And couple of refactors of your old code...