Ukraine would have to have placed explosives in the middle of the dam wall. A LOT of explosives. Since Russia has control over half that dam, it wasnt going to happen under their nose.
When Russia had full control over both sides, that is before the Khereson offensive, Ukraine claimed Russia had planted explosives. I think this explosion bears it out.
As for the damage to Russian forces, They intended to make it an area that Ukraine could not advance, and that was acheieved, But I suspect the breach was not intended to be so large, causing problems on the Russian side. Typical Russian miscalculation.
The dam had structural damage from HIMARS hits.
It was collapsed by dumping water from a larger dam upstream.
BTW, they still doing water upstream.