If you ever want to put the cost of something into context, remember that Mark Zuckerberg spent $77 billion on the Metaverse.
I went looking for an article I read a decade ago about the challenges of supplying water to NYC and maintaining the aging infrastructure. Part of the "race" to build new capacity is so they can actually turn off some of this supply for extended periods to repair it. Millions of gallons of water leaks or is just unaccounted for every day.
I didn't find it but this [1] kind of goes into it.
And since you can't turn the water off (generally), you need to do repairs in fairly extreme environments and use materials that don't corrode over very long periods of time. IIRC some pump or valve infrastructure was made out of manganese bronze for this purpose.
[1]: https://nysfocus.com/2024/11/27/new-york-water-leaks-drought