The only way I remember is by doing exercises. I'll read examples and understand immediately then not bother with the exercises only to forget later unless I've done X instead of just learning X. If I have 20mins to spare I'll often grab a text I've done and try and redo a few of the exercises to see if I can remember and that also helps, I learned that method from an older post here from somebody who suggested redoing material 6 months after to help remember.
> I'll read examples and understand immediately then not
> bother with the exercises
It's a trap a.k.a. the illusion of understanding. When you actually try to do something you think you understood from just reading/watching, it turns out a lot of small but essential parts were missed.