Very short attention span

Before You Begin
Pause and breathe. Even if this shouldn't be happening... accept that it is and embrace it with composure and calmness.
Calmness is the only way forward because without calm, there is no possibility for receptiveness and connection. Your child won't give to you any more than they see from you.
Never forget that a strong connection is fundamental, as there will be no correction in them if there is no connection with you.
The Core Problem
A combination of losing interest and not gradually building up the skill of staying focused.
What Will Make It Worse
Reacting with impatience, frustration, or criticism when the child struggles to focus, in place of addressing the core problem, will only raise their distracting anxiety and prolong the behavior.
What The Child Needs
1. To exercise their natural curiosity: Help the child find aspects of activities that spark their curiosity and interest, making it easier for them to engage and maintain focus. Actively keep them focused by having them tell you which part of what they are seeing is their favorite, or the most unexpected.
2. To build their attention endurance over time: Much like building a strong muscle, building their attention span won't be an overnight process - but continued successes of sustained attention will make them stay focused longer and longer as their sensation of "a long time" will keep reacclimating, and kick in later and later.
3. To stop watching short form, or "fast cuts" content: More and more, content on YouTube, TikTok, Instagram, etc. (even if it is meant for kids) is being edited to make it shorter in duration with extremely fast pacing where one scene jumps to another to another to another rapidly. If any child watches enough of this stuff their brain will reset to make this new pacing feel normal and easier to follow. Obviously, real life isn't so attention grabbing or sped up so it will seem very dull to a child that's set to TikTok speed. If your child watches a lot of this content you should switch them to more traditional long-form content that has a story or structure they have to follow along with.
How To Have The Conversation With Your Child
Find a good time to sit with them in a comfortable place that is free of distractions.
Share with them that you are seeing they spend less and less time interested in something - whether it is a show, a person, or playing with a toy.
Let them know that being able to pay attention to the same thing for a long time is not only important for school, but it can make everything, even play time, more fun too. When you keep your attention on one thing you understand it better and can even start to use your curiousity or imagination to really make things fun.
Next start working with the child on the "What The Child Needs" pointers listed above. Of course, you don't have to cover all of the pointers in one sitting - feel free to incorporate them into daily life.
The goal in talking with the child is to get them to realize all of the more fun stuff that they are missing out on when they passively consume whatever is in front of them, or don't stay with something for very long.