If you want to learn a programming language or concept or framework, rewrite stuff. It's simple as that.
I learned everything by trying new language or concept, fail to do it right and then do it again, more properly.
In the last weeks, one colleague wanted some small help to learn pytest. I gave him some basic ideas first. I didn't think of all the details properly, my mistake, and the result wasn't perfect. He had to rewrite it again. But he was glad as he could understand pytest much better!
Also, I have new colleague learning to be a computer programmer. I let her to write some code in very basic Python and then I showed her tips how to improve the code. So she can better understand what higher levels does. Hopefully. :-)
So, don't be afraid. Rewrite stuff.
In the end, writers do the same thing! Without that hardly anything would be readable.
Hm. I didn't rewrite this post. Well, don't listen to me! :-D