What do I turn off first?
The cold supply valve on the pipe entering the top of the heater, which stops the tank refilling. Then the energy: the gas control on a gas unit, the breaker on an electric one, and only if the panel can be reached without standing in water. The building's main is the fallback.
It is worth finding and labeling that valve before anything happens, because the difference between closing it in two minutes and in twenty is most of the loss. If it is seized, which happens on valves that have never been turned, the main is the answer and a plumber should be asked to deal with the valve when the heater is replaced.
On a gas unit, the gas control knob or switch on the heater itself is the one to turn, not the meter. If there is any smell of gas, nobody should be adjusting anything: leave the building and call the utility from outside. Water near a burner assembly is a reason to stay out of the room rather than to investigate.
Why does the water spread further than the tank holds?
Two reasons. The cold feed keeps filling a tank with a hole in it until the valve is closed, so the volume is a function of time. And hot water spreads more readily across a floor and into materials than cold water does, which widens the wet area.
In practice this means the room with the heater in it is rarely the whole job. Water runs under the door, along the slab, under the bottom plate of the wall and into the next room, where the first sign is often a damp carpet edge rather than any water at all. Readings taken outward from the heater are what find that, and they usually find it further out than a homeowner expects.
It also means the clock matters as much as it does on a supply line. The tank is not a fixed quantity of damage, it is a rate. Closing the valve is the single most effective thing anyone can do, and it is a job for whoever is in the building rather than for whoever arrives later.
Does a drain pan stop this?
A pan helps with a slow weep and does very little with a tank failure. A pan is sized for drips, and it only works if its outlet is piped somewhere that drains. A pan with no outlet, or a blocked one, simply holds water next to the material it was meant to protect.
Worth checking, then, rather than trusting: is there a pan, does it have an outlet, and does that outlet go anywhere? A pan draining to a floor drain is doing a useful job. A pan sitting full is a warning that something has been weeping for a while and nobody noticed, which is exactly the slow loss that produces growth.
None of this is advice about what to install, which is a plumber's conversation. It is about what to look at while the heater is still working, because a pan with standing water in it is the cheapest early warning available in most buildings.
What moves the price of a water heater loss up or down?
How long the cold feed ran, how far the water traveled, whether the space is finished, how much was stored in it, access, and the drying days the readings call for. No figure is published on this site, and the scope and price are explained and approved before work.
The two factors that separate a small job from a large one are time and finish. A tank caught quickly in a bare utility room is extraction and a few drying days. The same tank left running into a finished lower level with carpet, pad, drywall and cabinetry is a much larger scope, because all of that material has to be read and some of it removed.
Contents are the factor people forget to mention on the phone and then care about most. A basement with storage in it means sorting and a dated list, which is labor, and it is also the part of the claim the owner cares about. The heater replacement is a plumber's quote and is not part of this work.
Who replaces the heater, and when?
A licensed plumber, and generally as soon as practical, because the building has no hot water until they do. In Missouri plumbing licensing is local rather than statewide, so the credential belongs to the city or county the building sits in.
The two jobs can run alongside each other. Drying can start as soon as the water is out, and the heater can be swapped while the equipment runs, provided the plumber knows what has already been opened and where the drying equipment is working. Telling each trade what the other found is most of the coordination required.
One practical note for the claim: ask the plumber to keep or photograph the failed tank, and photograph it yourself before it goes. A failed tank is evidence of a sudden failure, which is the distinction a policy usually turns on, and it leaves the building on the back of a van the moment the replacement is in.