A Player is Not their Character
This is one of the biggest mistakes a fair number of DMs make. A character may have an Intelligence attribute of 18, and there is a good chance the player running them does not. None of your players can cast a fireball in real life, regardless of what level Wizard their character is. As a good DM, it is your responsibility to remember that. You also need to remember that it may have been a week or longer since your last game, but for the characters it has only maybe been a few minutes. Encouraging roleplay is great, but punishing players because they don’t actually possess the same skills as their characters can quickly make a game no longer fun.
Sometimes players need a nudge, and seeing that you are not the enemy, you should give them one when they need it. This does not mean you need to hold their hand through every encounter, let them try and figure things out on their own. But, when the players get truly stumped, offer a hint. If they can’t remember the name of the guard you told them 2 weeks ago, cut them some slack and give it to them. While I do encourage my players to take notes, I never expect them to remember every detail as if they had really just experienced what their characters did.
This is especially true if the player’s are stuck at a point where the story cannot advance. This pitfall has derailed many a campaign. Riddles and puzzles are a great thing, but they aren’t for everyone. Try to make sure that if the obstacle you put in front of the players is either one they can eventually overcome, or if need be, find an alternate way past it. If you create a dead end, you run the risk of the story not only coming to standstill, but also of the players getting frustrated and losing interest in the game.
Let players flex their creativity and their minds, but don’t hold it against them for not actually knowing everything their 600 year old elf druid does. In the end, it’s all about fun and making memorable stories.