Reasons Russia would blow the dam:
It provides a crossing point of the river.
The flooding raises challenges the Ukrainian army will face in trying to force crossings into the flood zone.
The reduced opportunity for cross river assault allows Russia to reduce force commitment in this area, and make those forces available to protect the land bridge to Crimea.
I don’t see any advantage in Ukraine destroying this dam, as it reduces their potential avenues of attack, and eliminates a sturdy crossing they could have used, in addition to the power generation capacity that has been lost to Russian scorched earth.