The best way to learn coding is focusing on one small singular topic, reading about that one thing and implementing it in a small throwaway project, and then applying it to a larger project. I used to watch entire Udemy courses and go back and not remember anything. Wasted so much time.
Dave Ceddia, an author in the React community, wrote a nice blog post about learning by breaking a subject down to really small parts https://daveceddia.com/path-to-frontend-developer-2019/
I think most people learn unit testing too late in their career. I learned it in my 3rd year in this industry and became good at it in my 4th. A lot of people are still terrible at it after 5 years professional development because they only treat it as a chore and I consider that to be a sad state of affairs.. After 5 years you should be able to teach less experienced devs on how to properly unit test.