The need to rely on railways has nothing to do with some kind of inferiority of Russian supply, trucks, or whatever. It is just the nature of the crappy transport infrastructure in Ukraine. You have either dirt roads or railways.
It took me about a minute to get these two random screenshots from Google Maps to show what a typical main category road looks like.
This is in the direction of Poltava which is not far away from Kremenchuk, an important crossing on Dnipro. Potentially a very attractive direction for attack if Russia was capable of conducting and supporting such penetration away from railway lines. Approximately 300km which severs supply lines to all forces in Donbas. Arguably what Russia should have done instead of idiotic reckless push toward Kiyv and equally pointless grind toward Izyum.
The truck is a MAN L2000 - 7,5t class. However it has comparable ground pressure with that of a military 6x6 like Ural-4320 due to number of axles and tyre size. Actually the 6x6 is likely to have a lower figure even at double the maximum mass (15t).
I could provide technical explanation for structural strength of the roads of various categories, the parameters of trucks etc. and how much can be carried over hard and soft surfaces but that would make for one boring off-topic and I already wasted too much time writing this. I literally do stuff like this for a living.
The roads are not good enough to guarantee the supply, especially in the mud seasons, so you need to resort to railroads. Any trucks you use would get bogged down in impassable mud in mud season. This was also true back in WW2 where most conflicts in the Eastern Front were in fact fought along the railway routes.
The roads are exactly the same roads that Russians use to deliver supplies unloaded from trains. Ammunition arrives at an unloading point then it's taken onto trucks and then to the front.
For example in the south there is only a single rail line approximately 30-40km from the frontline and access to positions near Velika Novosilka is provided by roads of significantly worse quality than those on images above. Somehow Russians are capable of doing it using trucks, but according to your logic they wouldn't be able to drive these same trucks over hardened roads between Melitopol and Mariupol.
Roads in majority of Russia are significantly worse than those in Ukraine and Russian military trucks are designed to drive on them - which they do. The question is whether you've actually ever been in Ukraine or Russia.
WW2 operations followed rail lines primarily because rail lines connected important settlements and organized all of infrastructure - including roads. Rail was heavily under-utilized by Germany because of gauge difference as well as lack of preparation. Those lines primarily served as orientation. In WW2 maps of Soviet territory were imprecise or non-existent. You stuck to what you knew so as not to get lost or stuck in enemy territory. Again - someone who has never learnt how a military mission is planned and conducted will never understand it.
Russia is one of the few countries which even has Railway Troops as part of their force structure.
Railway Troops are tasked with maintaining and defending railway lines and rolling stock used by the military. The engineering part where they build and fix railway lines is a
secondary task. They're part of a branch called "Material-Technical Support of the Armed Forces of the Russian Federation". It's essentially a separate logistical service including Railway Troops as well as Road Troops and Pipeline Troops. But their names shouldn't be taken literally.
In the Soviet Union Railway Troops maintained rail lines which led to military units or closed cities, while the rest of the rail network had its own protective and maintenance service. Railway Troops had therefore personnel that functioned as parallel Soviet Rail. In USSR rail functioned as an uniformed service with its own police reporting to its own extensive cabinet-level department of government. That made Railway Troops a branch in its own right for administrative reasons. They were "military rail" not a railway engineering brigade.
The reason why they are treated separately is because of tradition and institutional inertia and not because of function. Function is why they are being consolidated into a single support service. Technically there is no longer a separate branch of "Railway Troops" just the traditional name.
One good practical example of how quickly the Russians can build infrastructure is how quickly the Russians built the Crimean Bridge without foreign assistance, and how quickly they repaired it after the bomb attack on it.
The Crimean bridge was built over 4,5 years (May 2015 to December 2019) following survey and design stage that formally began in 2013 with preparatory work done earlier. This is an average tempo for such projects.
Øresund linking Denmark and Sweden which involves an undersea tunnel as well as a bridge was built in five years. Hangzhou Bay Bridge in Zhejiang which is twice as long as Crimean bridge was built in approximately five years. Both are more complex and demanding projects so Russia has no claim to performance and the project wasn't particularly complex or challenging.
The damage to the road bridge affected only a single span and possibly the supports. The concrete pillars and foundations were not affected because those elements are ridiculously strong. Just to give you an idea how strong - you could detonate a nuclear warhead nearby and they'd be standing although their structural integrity would be very much lower due to heat. The railway bridge likely also wouldn't be affected by the train fire to any significant degree. Some minor loss of loadbearing capability but not much.
The damages were minor and repairs weren't a technical challenge. In fact in Japan or China it would have been done much faster because Russia's capabilities in that area are far from world's best.
Another example is how quickly the Russians connected Crimea back to the rest of the rail system in Southern Ukraine. Today you have operational rail links between Crimea and Melitopol for example. Crimea is connected to Russia not only via the Crimean bridge but also through Southern Ukraine.
The railways in Crimea and southern Ukraine were functioning as a single system before 2014 and the infrastructure was not dismantled after the annexation. Even if parts of the rail track were dismantled then as long as the underlying structure is intact you can simply lay the tracks where they used to be and at worst the train will have to go slower over those parts of the track. If sections are weakened then it's not difficult to bridge over them temporarily and finish the work while the line is already operational. Disruptions are minimal.
Another issue you seem to ignore is that the problem of being limited to rail transport to sustain a major campaign is not restrained to Russia, but also to Ukraine.
Ukraine's inability to support its operations in no way determines Russia's ability to support its operations.
That is one of the reasons why Ukraine has been so stubbornly defending Bakhmut in the first place. Later after they lost several of the rail heads into and out of the city the major issue seems to be sheer stubbornness and Zelensky's moronic idea that he cannot concede any terrain to Russia whatsoever in the war.
The only reason why AFU defends Bakhmut is to prevent Russian forces from establishing a railway link along the entire front as well as leading to the southern flank of potential encirclement of Siversk. Again - this is straight from manuals. Both Russia and Ukraine use the same operational art. Russia is trying to take control of an objective and Ukraine is trying to deny it. The generals literally studied under the same instructors.
Ukraine conceded quite a lot of territory in the north since their push in autumn. After AFU failed to break through to Svatove and Kreminna they were effectively driven back all along the road and are consistently losing ground if in small increments. Nobody is making a stand because unlike in Bakhmut there is no point to it.