Quick answer:
For water-damaged wood, the first 72 hours decide a lot. Remove water, run fans and a dehumidifier, and let the floor dry slowly and fully before judging the damage.
Rushing to sand or replace a still-wet floor wastes money.
Refinishing (sand and re-coat) restores solid hardwood with surface wear, scratches, or mild cupping — and solid wood can be refinished several times over its life.
Replace when boards are buckled, the subfloor is compromised, there’s mold underneath, or with swollen laminate/engineered planks that can’t be sanded.

Make it safe
Handle immediate hazards first (electrical, structural, contamination).

Find the cause
Fix the source, not just the symptom, so the damage doesn't return.

Repair from the inside out
Structure and systems before surfaces.

Maintain
Protect the work you paid for.
Can water-damaged hardwood be saved?
What's the difference between cupping and buckling?
How many times can hardwood be refinished?
Should I refinish or replace?