Specifically, TNFα mediated the association between BMI z‐score and working memory only in adolescents, whereas in adults, cortisol and anxiety mediated this association. Here, TNF is linked to Anxiety.