The Portuguese colony became one country that was brazil, but why did the spanish colonies separate into many different countries and didnt remain unified like brazil.
This question has been asked a number of times on this sub, so I shall link the excellent answer by /u/Breklinho from 9 months ago.