Let's say a spellcaster is fighting a dragon. Can a they ready their action to put up a Wall of Stone with a trigger of "If the dragon uses his breath weapon I block it with Wall of Stone"? If so, how high would it have to be made?
The method for readying an action is that you hold the spell at the ready (pre-casting it) then use your Reaction to cast it under a given trigger.
But here's the catch:
When the trigger occurs, you can either take your reaction right after the trigger finishes or ignore the trigger. Remember that you can take only one reaction per round.
Emphasis Mine from PHB193
If you have readied a Spell to cast if a dragon uses its breath weapon, the only time you may unleash the spell is after the dragon has used its breath weapon and the outcome of that has been resolved (finished). Meaning you will cast Wall of Stone after the dragon uses its breath weapon, and thus you've already saved/taken damage from it.