Personally, I have just studied whatever course I was studying 2 times. Thin skimmed over a 3rd time.
e.g. api.jquery.com, study whichever methods I need, write the code from memory, then study those same methods again and rewrite the code from memory again. Then skim over it a 3rd time. It seems to always stick then.
So that next time I’m building something, I know the methods I need from jquery purely from memory, their exact signature, what they’re supposed to do, and whether or not it returns anything, all from memory without having to reference anything.
But that route does require a lot of time. And it’s useful only if you really want to code purely from memory.
There is nothing wrong with depending on documentation rather than your memory.