Spanish is an official language in almost all countries in Latin and South America.
But not in Brazil.
Portuguese is the official language in Brazil.
While knowing Spanish, you can still manage a lot; and Spanish is rather more useful in Brazil than English.