At the beginning of the war, the Union had a significant advantage over the Confederacy in terms of population, resources, and industrial capacity. The Union had a population of over 22 million people, compared to the Confederacy's 9 million. The Union also had a much larger economy and more developed industrial infrastructure. As a result, the Union was able to produce more weapons and supplies than the Confederacy, and to field a larger and better-equipped army.
The Union also had a number of strategic advantages over the Confederacy. The Union controlled the Mississippi River, which gave it a major transportation advantage. The Union also controlled the border with Mexico, which prevented the Confederacy from receiving supplies from that country.
As a result of these advantages, the Union was able to win the Civil War.