Yeah, that won't be so easy. How many kilometers of railway line does Ukraine have? How many precision guided missiles does Russia still have? How many of those missiles will actually hit the intended targets? How much does such a missle cost and how much does repairing a short stretch of railway line cost? How fast can Ukraine repair a railway line?
With regards to electricity infrastructure, much the same goes for that as well. Ukraine is now connected to the EU grid. Strain on the Ukrainian grid by the loss of a generation unit or two can be made up by electricity imports. Coal plants will need multiple missile strikes to be rendered inoperable and unrepairable.
Nuclear plants can't be destroyed without risking massive NATO retaliation and powerlines can be repaired relatively quickly.
Starlink will secure internet access.