Correlation does not prove causation, but when overweight people lose fat, their cognitive functioning improves. Many studies, at this point.
Furthermore, as is well-established now, being overweight is a major risk factor for dementia (#2 after genetic).
My view of overweight is Live and Let Live. Overweight people know all of the consequences, and accept them as adults. I do help pay their self-inflicted Medicare bills but that's life in the US today. As an outdoorsy, sporty, fitness person I feel that giving up on vitality is sad, but people must do what they want to and nobody needs to be like me.
If you care, it's easy to lose 1.5-2 lbs of fat/week in a healthy way with a smidgen of self-control. We have posted on that topic many times. Underweight is another issue entirely.