South America was divided on the highest level into the Spanish and the Portuguese colonies. Spanish colonies were also divided into viceroyalties. Shortly after the independence, the old viceroyalties, bigger countries like the Argentine Confederation or Gran Columbia splintered into their (for the most part) today's counterparts. But why? Why did Gran Columbia splinter into Venezuela, Columbia and Ecuador? Why not only into Venezuela and Columbia or Venezuela, Columbia, Educator and a fourth country? Why and how did these new national identites came into existence?
See my (u/BarCasaGringo) answer to a similar question here.
I've always had a more specific version of this question unanswered in my mind. Now I understand why all of the American landmass south of the Rio Grande didn't coalesce into a single nation from Tijuana to Tierra del Fuego (or even into two, one Spanish-speaking and one Portuguese-)--that would just be way too large, and encompass too varied populations, to be feasible. And countries like Argentina, Bolivia, Brazil, Peru, Colombia, and Mexico, while not the largest countries in the world, are certainly not small; all are substantial, good-sized countries. But what about the rather tiny countries of central America? Why are Guatemala, Honduras, El Salvador, Nicaragua, and Costa Rica not one country (Panama and Belize of course have their own reasons to be separate)? Pre-independence, they were all part of the Captaincy-General of Guatemala and, so far as I know, its independence of brought about by one movement, not by separate groups for separate reasons as was the case with the larger viceroyalties.
When I was in Guatemala, I asked this question of my Spanish teacher, and she said that there are differences between the peoples of these areas. I said that I don't doubt that, but few countries of any size have no differences between the peoples of their several areas. But for some reason the significant differences between the various regions of Brazil or Mexico or the U.S. or India or China are not considered obstacles to the unity of those countries, but in central America their (in my opinion, the less significant) differences are. Maybe someone with greater knowledge of these countries than I can comment.