In terms of coding, what do you actively memorize, vs figure you'll indirectly memorize through use, vs figure that you'll Google again for in the future?
You don't need to know every English word to be a good English speaker.
You'll learn and forget all sorts of things in your life. The things you remember, the things you need to remember, are the things you use all the time.
Outside of exam halls and ridiculous interviews, you almost always have a search engine. Knowing how to use it is 50% of professional development.
(Note: I'm not saying don't learn things. Of course you need to learn syntax and how stuff works and ... well, there's huge amounts of stuff any given developer might know... but there's a difference between picking stuff up and dryly flash-carding out topics. I [obviously] favour learning what you need by doing than trying to learn a whole book, cover to cover.)
Have bookmarks to api docs so you don’t need to google them every time and search logically through links in those. It’s much faster to look through nodejs docs than google “how to open file in nodejs” and get a useless 200 word medium article aimed at getting its author some traffic.
Treat remembering like automation. Is it worth automating and is it worth remembering are similar questions. Y.A.G.N.I. applies where the “a” is one of [‘aint’, ‘are’].
Memorize solutions that you make or read about, like methods to optimise databases and their queries. The better you write your code the more it will become your reference.