I don't think Biden's Afghanistan blunder had anything to do with his age. I think Afghanistan is a blind spot for him.
The following are things I've read in mainstream sources (CNN, Reuters, BBC, etc):
-Biden has an unshakable belief that withdrawing the US from Afghanistan as quickly as possible is the correct decision
-Biden has filled his team with advisors that share this belief
-Biden is generally tolerant of debate but will shut it down quick when it's something he feels knowledgeable on, especially foreign policy
These things are a recipe for disaster. It's how you get a President acting as if the world is how he wants it to be and not how it is. Biden's strong belief in withdrawal makes it difficult for him to see the risks and downside. Advisors would normally be able to help him by pointing those out but he's picked people that agree with him on this. Anyone who might speak up wont as this is a topic Biden would likely shut down discussion on.
So instead of paying attention to the warning bells, listening to those sounding the alarm, and having contingencies in place, Biden moved forward as if the withdrawal would go off flawlessly and was caught shocked and flat footed when it didn't. It's not terribly dissimilar to how we got into this situation. Instead of the belief in withdrawal we had a belief in nation building.