In the long term, sure. Reducing the number of lines of possible attack rarely have a downside.
Bridges are usually the better option because that make it more difficult to bypass a destroyed bridge, forcing Russia to install temporary bridges, and also allows for a single target for artillery, HIMARS or drones.
Destroying roads would be more effective during rasputitsa, the mud season, because it would be more difficult to travel off road. Presumable, Ukraine would want to a more thorough job of making the road way even less passable than simple tearing up the paving. Mining roads slows things down a little, but doesn’t make them impassible forever.
Ukraine perhaps also could make plans on how to flood areas with the purpose of making it more difficult for amour to travel through an area.
Destroying rail lines is never a bad idea, especially against Russia, which depends on rail so much. However, rebuilding rail lines also isn’t as difficult as rebuilding bridges, but anything done to slow down an invasion is helpful. This seems to be the map of rail lines and there
Short term; a lot of the border between Ukraine and Russia is in the Kharkiv area and to the west, and the Russians doesn’t look like they are capable of mounting a realistic threat right now. However, the more they can make it more difficult, the better it is. Blowing up your own bridges is easy, and there isn’t a need to keep them, as (presumably) Ukraine isn’t planning on invading Russia.
If the Ukrainians had a time machine, I’m sure that they wish they had done more of this before February, and they could have made the invasion much more difficult and slow. Blowing up the Antonovskiy Bridge and other bridges over the Dnieper River may have made a difference.
Note that, blowing up bridges, flooding areas and destroying road and rail links may not be able to protect your country from a competent force. See Singapore in WWII or the Dutch against the Nazis, who had plans in place to counter these measures. However, Russia doesn’t seem to be in that league.
Aggressive countries have often insisted that weaker countries don’t blow up their rail lines, roads, bridges or tunnels as “an act of war” even though those should be defensive measures.
I would be surprised in any of the rail lines are intact now.
Also, because Russia’s intent in crystal clear now, it is more difficult for them to pull off a surprise again, even if they had the troops.
Military experts don’t seem to believe that Russia is capable of mounting effective offenses now or anytime in the near future.
Perhaps next spring, but there isn’t any indication that they have solutions to any of their systemic problems.