Zelda's upsmash outprioritizes nearly every d-air.
There are, unfortunately, a few that it doesn't. Most of the d-airs that cause the player to go flying straight down at high speed will out prioritize Zelda's upsmash (so G&W, Toon Link, etc.) as well as a few random other ones.
Against these, you'll want to roll away. or avoid and then hit them while they are in the landing lag. Certain ones like Toon Link's d-air cause him to bounce if he hits your shield, so be careful of that.
Avoid and counter. You'll just have to keep track of which air-moves outprioritize the up-smash. There aren't a ton of them, but still, you don't want to be up-smashing into something that's going to get you hurt.