It depends what you play. Strategy and puzzle games are the strongest case: they ask you to plan ahead, weigh resources, and adapt when a plan falls apart, which is genuine mental exercise.
Fast action games contribute something different — reaction time and spatial awareness. Games that ask nothing of you contribute little either way.