"gaze" here means attention, and the subject of "exerting its influence..." is Brazil, so the sentence means "Brazil has largely avoided the gaze of the United States, and Brazil is exerting its influence through regional alliances and multilateral institutions instead".
Your interpretation here is spot on.
It's a little awkward since it's "the U.S." followed by "exerting its influence...", and I don't know which two things are contradicting here, indicated by the word "instead".
As others have mentioned, the subject in the prior clause is "Brazil has largely avoided the gaze of the United States", so what is being contradicted is the means of exerting influence that is implied by the prior clause. Here we need to rely on context (in particular the following and preceding sentences or paragraphs) to determine what means of exerting influence is being implied.
This sentence is preceded by
“Trump is an example to me,” Bolsonaro said on a campaign trip to the United States last year. “I know there is a distance between me and Trump, but I hope to become closer to him, for the good of Brazil and of the United States. I want to bring lessons from here to Brazil.”
Brazil’s relationship with the United States has historically ranged from cautious friendship to reluctant acceptance.
and followed with
He makes the case that Brazil could be the United States’ main partner in the region to contain leftist ideologies and Chinese influence in South America.
The key point here is that the United States and Brazil have historically had a distant and somewhat tenuous relationship where Brazil engaged the U.S. "through regional alliances and multilateral institutions" rather than having a close diplomatic relationship where the two nations collaborated at a very high level. Bolsonaro, according to the article, wants to change this. Instead of having relations at an arm's length from one another, he wants to be close partners.
In summary, the difficulty in considering that sentence in isolation comes from the fact that what is being contradicted with "instead" is implicit rather than explicit, which means that we need to rely on context clues from the larger piece of writing (particularly what immediately precedes and follows the sentence we're interested in) to understand what meaning is intended.