Brain dynamics moderate the relationship between age and cognitive flexibility: simple slopes. The interactions presented in A and B were between Age2 and the brain dynamic metrics for CAP 5 and brain state transitions; however, they are presented across age (years) for visual purposes. Additionally, the simple slopes for both interactions are presented to visually determine the effect of age on the cognitive flexibility measure across three different levels of the moderator as represented by the brain dynamic metric (i.e., −1 SD below the mean, at the mean, and + 1 SD above the mean). Additionally, the y-axes were reversed and standardized so better cognitive flexibility is at higher ends (the top) and poorer cognitive flexibility is at lower ends (the bottom) of the y-axes. (A) The CAP 5 dwell time (DT) moderated the relationship between Age2 and the TMT Switching condition (total time to complete the task) as represented by the simple slopes. CAP 5 is characterized by co-activation among the L-FPN (executive control) and M-FPN (default). Children and older adults who spent a longer time in CAP 5 had poorer cognitive flexibility, whereas younger adults had optimal cognitive flexibility regardless of their CAP 5 brain dynamics. Similar findings were seen at average levels of CAP 5 dwell time. Children and older adults who spent less time in CAP 5 had optimal cognitive flexibility relative to those with average and greater time spent in CAP 5, whereas younger adults had poorer, yet still optimal, cognitive flexibility. (B) The number of transitions moderated the relationship between Age2 and the TMT switching condition (total time to complete the task) as represented by the simple slopes. Children and older adults who had fewer brain state transitions had poorer cognitive flexibility, whereas younger adults had optimal cognitive flexibility at average and fewer transitions. Similar findings were seen across individuals with average numbers of brain state transitions. Children and older adults with greater brain state transitions had optimal cognitive flexibility relative to those with average and fewer brain state transitions, whereas young adults had poorer cognitive flexibility.