I think this is normal especially if you’re changing languages, frameworks, codebases. Some people are gifted in memorization of these things and others of us just forget if it’s not needed. I do the same thing with people’s names.
If you’re working on the same type of thing everyday you’ll likely remember how to reverse an array in JavaScript. The other day I was trying to remember how to reverse a string in JavaScript… that was fun.