My son has the exact same problem. He gets stuck thoughts that can lead to serious anger and meltdowns. Some have suggested to me over the years that it could be OCD, presenting differently than how we think of OCD, but that felt like it didn’t quite fit.
Around age 10, I started suspecting autism, for a few reasons. And the stuck thoughts is very common for kids on the spectrum. Turns out, I was right and he does have autism in addition to ADHD. It was difficult to get diagnosed — took 3 clinicians before someone would look beyond stereotypical autism traits, like conversational skills and eye contact. The addition of autism explained the stuck thoughts and several other symptoms that really felt like more than ADHD.
Stuck thoughts could be anxiety, OCD, autism, or probably other things. I would get another evaluation to see what else might be at play for your son.
No matter the origin, I think stuck thoughts come from either fear (fear of consequences, fear of missing out, etc…) or concrete thinking and really only being able to see one way in that moment. It’s important to know which is happening for your son to address each instance most effectively.
Often, my son has to be left alone until his brain gets unstuck and cycles beyond it.
ADDitude Community Moderator, Author & Mentor on Parenting ADHD, Mom to teen w/ ADHD, LDs, and autism