With some dogs - you'd probably have to pair the "NO" shout with something that they really don't like for them to take notice.
a bit like charging the clicker - eg click and then treat.
It would be "No" and then cause pain or significant discomfort.
Not a path I want to go down.
My dog just gets excited if I or anyone else starts yelling. She's looking for that naughty person, dog or blowfly to have a go at. Couldn't possibly be her.
I suppose I could pair "No" with a collar grab, that might do it with my dog. But it would be a neutral toned "No" not a yell. like "No, not what I want you to be doing", not "Fsk you nearly killed yourself and scared the crap out of me" scream.