Hey there! I'm happy to help!
After Columbus discovered the Americas, Spain didn't want Portugal to interfere because the Portuguese were also fanatic explorers.
So, the Pope came up with a compromise where the Spanish could colonize everything West of the Line of Demarcation (a line of longitude that cut through Brazil) and the Portuguese could only colonize everything West of it. This was agreed on in the Treaty of Tordesillas.
This is why so many more countries in the Americas speak Spanish and only one main one speaks Portuguese (Brazil), which is also probably one of the most Eastern parts of the Americas and was probably of Portugal's side of the line of demarcation.
Have a wonderful day! :D