A pond behind a small dam will swell up and hold water when it rains, slowly releasing the water downstream over time. Thousands of such dams add up, leading to a major rainstorm's water taking a longer time to fully dissipate into the rivers downstream. The same total water (almost) will go through the river, but with a lower peak load, and over a longer time.
The rivers are less likely to burst their banks. Homes, towns, cities are saved massive damage.
And as this article shows, the areas behind the dams stay wet much longer, reducing drought and fire risks.
All we have to do is, when possible, let the beavers build their dams.