There are several reasons for this disparity. First, the North had a much more developed economy than the South. This meant that there was more demand for transportation of goods and people, which in turn led to the construction of more railroads. Second, the North had a more favorable terrain for railroad construction. The land was flatter and there were fewer rivers to cross, making it easier to build and maintain railroads. Third, the North had a more favorable political climate for railroad construction. The federal government provided financial support for railroad construction, and the states were generally supportive of railroad development.
In contrast, the South had a less developed economy, a less favorable terrain for railroad construction, and a less favorable political climate. As a result, the South had far fewer railroads than the North.
The lack of railroads in the South had a significant impact on the outcome of the Civil War. The Union was able to use its railroads to transport troops and supplies quickly and efficiently, while the Confederacy was often forced to rely on slower and less reliable means of transportation. This advantage helped the Union to win the war.