Three limits decide an installation: the space the unit has to live in, the exhaust path, and the services already feeding it. The unit itself is chosen last, to satisfy those.
The space
A water heater needs clearance from combustibles, room to be serviced, and a route out when it is replaced. Garage alcoves and tight closets are the two arrangements that cause trouble — not because the unit is wrong, but because the replacement has to travel through the same opening the original came in by. That is measured before anything is ordered.
Where the exhaust can go
Every gas heater discharges somewhere, and the existing route is either usable or it is not. A storage tank's flue has a rise and a clearance requirement; a condensing or tankless arrangement usually wants different pipe altogether. Keeping the same appliance type tends to keep the existing flue, while converting means new material, a new termination and a different penetration of the roof or wall.
What the house supplies
A tankless burner pulls far more gas in a minute than a tank does, so the line may be undersized for the conversion even when it was perfectly adequate before. Electrical work follows the same logic: resistance heating needs a circuit built for its rating, and putting a larger element behind an unchanged breaker is a mistake, not an upgrade.
Restraint and discharge
Seismic restraint is required for water heaters in California, and an installation is the moment to confirm it is present and correct. The relief valve also needs a discharge pipe that ends where scalding water cannot reach a person and cannot back up into the structure.
What a swap leaves alone
Same type, same size: the venting, gas line, circuit and water connections all stay as they are, and the job is removal, set, connect, strap, fill, test. Anything else is a different scope, and it is worked out from the installation rather than quoted from a page.