DMs Should Say "No" More Often, Actually

If you have spent any time reading or watching advice on how to be a great Dungeon Master, especially for 5th Edition D&D, you have probably seen some variant of advice telling you to use "Yes-And" principles in your games. A lot of advice from the worlds of improv and theater acting have made their way into the TTRPG sphere, but this particular bit of wisdom has really wormed its way into everyone's brains.
At a surface level glance, it's really not bad advice. Following "Yes-And" principles can help players engage in the fiction more, become more immersed in the game itself and become active contributors rather than passive participants. And particularly if you are trying to up your acting skills, maybe after watching some Critical Role or Dimension 20, looking to the improv community for advice isn't a bad start.
Like so much advice in the internet age though, this advice is presented without context on how to actually use it effectively. It also wrongly assumes that you have some sort of ideal table that perfectly understands all the game boundaries. Yes, Brennan Lee Mulligan, with his tables filled with trained improv actors, is of course able to "Yes-And" his tables all the time! My table in high school where I had at least two players constantly trying to get away with sneaky bullshit, maybe they needed to be told no more often.
Ultimately, whether you consider yourself a DM, GM, Judge, Referee, Storyteller, Warden, Conductor, or whatever other term your game of choice uses, there is one thing in particular you need to keep in mind; you ARE the world. Even in games that focus on collaborative storytelling (like most Powered by the Apocalypse games), your job is to keep track of everything going on in the world and bring it to life. That means sometimes you gotta say no, that doesn't actually work here! And that's okay! You don't have to treat your players like children in the checkout aisle asking for a candy bar.
In a social or therapy talk sense, part of your job then is to set effective boundaries for your players. Yes it's their game too, yes agency is super important, no that doesn't mean their character gets to use a scroll of Wish to get a thermonuclear weapon (unless you're really into Sword & Planet stuff and you actually have nukes in your game, in which case...that sounds rad where do I sign up?).
That also doesn't mean that your players are assholes for trying to test these boundaries (although they could be!). It is natural to want to test the limits of what's capable within the fiction and mechanics of the game! And it doesn't mean that you're never allowed to say yes, and! It just means that you might need to do some thinking before you enable every little thing your players want to do.