The need to build a railway on the Moon is dictated by two factors. The first is the long distances between target objects, such as mineral deposits or water ice. The Moon is very large to walk on it on foot, much less to transport any cargo, a special transport system is needed to explore it.
The second factor is more important. Due to the absence of atmosphere and moisture, dust on the Moon does not turn into dirt, the soil is not subject to erosion, so all the formed small grains of sand do not disappear anywhere. They are constantly present on the surface and have a mechanical effect on everything they come in contact with. Dust particles work as an abrasive material, accumulate static electricity and deform everything around them, causing even more fine particles to form.