for 2 centuries we were a pretty irrelevant colony, brazil expanded beyond the borders of the treaty of tordesillas during the union with spain, because the spanish stopped caring at that time, brazil expanding beyond its legal borders didn't matter anymore because they all had the same king. they didn't suspect that portugal would become independent again.  brazil expanded through slave hunting, in so paulo a class of mamelucos/cablocos (mestizos) like me called bandeirantes developed who were great explorers in search of natives to enslave, their favorite victims were the indians of the jesuit missions, because the indians there were trained and educated, therefore better slaves. later, in the 1700s, gold was discovered in minas gerais, and that's when brazil finally became an important colony, so many portuguese moved there during the gold rush that they had to prohibit emigration to brazil. this lasted 50 years until they ran out of gold, so they discovered that they could make money from coffee, not just sugar.  brazil compared to spanish america was a shithole. the indians here were still hunter-gatherers living in villages unlike the urbanized mesoamerican civilizations, the vast majority of the country's inhabitants were black slaves on plantations, but also indians in the beginning, the rest of the population was composed of slave owners and hunters. it was more like the british caribbean islands than peru, mexico or chile (which is interesting because portugal is the oldest ally of the british empire:   -portuguese_alliance ). there were no universities in brazil, no urban planning or rules for founding cities or high culture. the most we had were the jesuits and they were constantly persecuted and expelled.
Brazil