LIVINGSTON, Mont.—When a torrential flood struck this town nestled on the banks of the Yellowstone River in 2022, it swamped areas that scientists had long predicted were susceptible to flooding.