I would guess it is doubtful that everyone remembers everything in any language. If the idea is to read X amount of books and then be an expert, you will most likely be disappointed. At the very least that is true for me.
A book that guides you through the basics certainly isn’t bad and I think can give you a foundation in a language, but no book will make you an expert.
I may learn one thing about a language (or programming in general) for one specific use case, and then not need that specific bit of information for years. When the case does resurface, I only have a vague recollection that I once dealt with a similar case, and then I either work it out again, reference my old code where I solved it before, or re-learn it again. I am constantly learning and re-learning and my re-learning is often based on how much I apply that learned knowledge. Sometimes, when I have to re-learn something a second time, it may make more sense than it did the first time as I now have more experience.
I’ve learned multiple languages over the years. I think, once you know the basics of programming, which are relevant to all programming languages, it gets easier to pick up new languages.
My general approach when picking up a new language is to first learn the basics: understand its logical constructs, how to import libraries, how to set variables, how to set up your first project, etc. Look at some basic examples so you can get some generic “Hello world” program or something set up.
Then I learn more nuanced things on a need-to-know basis. I do this by writing an actual program I’m interested in, or I may try to port over something I’ve done before in a different language. When I get stuck, I’ll see if the language has a built-in solution to the problem, see if there is a common 3rd party solution, or I may decide to just figure it out myself to learn more about the language. Some of this is trial and error to see what works and what doesn’t work, some this is me reading the official documentation, and some of this is me reading articles or books about the topic I’m stuck on. But I’ll learn everything I can about the specific area I’m stuck in so I can move forward.
Over time, I may learn better ways to do what I thought was the right way when I initially started, and that’s okay. Ask any programmer to look at the stuff they did years ago, they probably all think what they do now is better.
Basically, I don’t try to learn everything at once, I learn enough to move me forward and gain knowledge and proficiency over time. And the more I use something, the less I have to keep referencing it.
On the side, I may read other material to better acquaint myself with the language, to learn about things I have no immediate use for, and some percentage of it will stick, but often it isn’t until I actually have to use that learned knowledge that I truly learn. But when I run into one of these issues, I may remember that I once read an article or book that covered this info, and I’ll go look it up. On occasions, I may remember more than I thought.
Learning a language is a journey. If you want to get better, use it more. I find using a language and stumbling through that usage is the best way to get good. You’ll find over time you will be writing more complicated things without referencing things you used to.