Though I will say, targeting infrastructure is part of war, not a warcrime.
It depends on the specifics of the infrastructure, really. Bombing rail lines carrying weapons to the front? Not a war crime. Blowing up a dam and deliberately drowning hundreds of thousands of civilians? War crime.
Either way, Russia has been extremely restrained in their destruction of Ukrainian infrastructure, especially in the first year of the war. It’s downright shocking when you compare the infrastructure left intact compared to what was left intact after only the first few weeks of the US invasion of Iraq.