They restored electricity. Its not easy to get rid of electric infrastructure if the owners have basic spares and supplies.
The hard parts to replace are transformers, boilers (if relevant) and turbines. All of these are or can be “hard targets”, and will require multiple hits or very accurate missiles.
One would have to maintain a bombardment to keep the system down. Rather like railroads.
“if”
Well, that might be a pretty big “if”, especially should the Russians keep hitting these targets. There seem to be some reports of that, but I am unclear as to their extent, how many might be duplicate reports, etc.
After 911, the US’ lack of inventory of large transformers was regarded as a liability in the event of a number of coordinated terrorist attacks on units in service. I do not know if that has been addressed here, and would really wonder if the Ukies spent the money to build up reserves.
“can be”, but are they? The US took out transformers at 2 Iraqi transformer stations in GW2, with 20 mm cannon in what I gather to be single strafing runs* at each location. Both stations were down for a protracted period.
*I would hasten to add that these particular attacks were outside our own ROE and not repeated elsewhere, SFAIK / per Human Rights Watch.