Credit is one of the very few things that multiplies when you divide it. Naming someone's contribution in a room costs you essentially nothing and it gives the other person something with real value: visibility with people they could not easily reach themselves. The arithmetic is so favourable that it ought to be automatic, and in my experience it is not.
The failure is mostly carelessness rather than malice. You present the work, you are focused on the argument and the audience and the questions coming, and the sentence naming the person who did the hard analytical part does not get said. You did not decide to omit it. You simply did not think of it, because you were thinking about something else. But the asymmetry is brutal: for you it is an omission you will never recall, and for the person whose work it was it is a specific moment they will remember in ten years. I can name the times it happened to me earlier in my career, and I am quite sure that nobody involved remembers doing it.
Which means the only reliable fix is to make it deliberate rather than spontaneous. Decide before the talk whose name you will say. Put it in the email rather than intending to mention it later. Be specific, because "the team did great work" attributes nothing to anyone, while naming the person and what they actually did is both more useful and more obviously sincere. And do it in front of people who matter to them, not to you. So, as a reflection for today: whose contribution could you name publicly this week?