The Union won the war because:
1) There factories were built up; the South was mostly farms
2) They had the support of African slaves located in the South
3) They had larger armies
4) They had a more built up navy
5) They were able to deprive the South of their economy and allies
hope this helps