In my mothering experience, there's an idea that has been repeatedly reinforced. I call it The 15/45 Principle.
The 15/45 Principle and How It Can Dramatically Change Your Day Starting Right NOW!
When a child is wanting your attention, if you will spend a solid chunk of time, like 15 minutes, giving them intentional, focused, positive, and sweet attention (like reading books, talking, playing, etc--not on your phone, watching TV, or folding laundry), they will get that need met and then be happy to go back to independent play for a large chunk of time, like 45 minutes.
Does this work for all children? Of course not. Babies and kids under 1 don't generally do this, nor would special needs kids or kids who haven't learned to play independently yet.
I can't tell you how many times it's been CRYSTAL CLEAR that a kid needs some ATTENTION, and I read that book, or snuggle, or have the conversation about Minecraft and then--BOOM! they're crawling off my lap and off to their next adventure. Because like eating a sandwich, they get that attention need met and then they're just fine until they're "hungry" again!