In the UK, the BBC has been very biased and superficial in its reporting of the election results, and always referring to Bolsonaro as 'far right'. Nothing about the PT candidate Haddad being an expert in Marxist theory, with a Communist running mate standing for the Vice President. There was a fear that if PT had won this election, Brazil would have gone in the same direction as Venezuela.
Brazil is suffering serious economic problems, problems with crime, and serious corruption, which PT has failed to deal with (or, in the case of corruption, became part of). It's difficult to see how keeping the same party in power would bring about a change. And PT wanting Lula (previous leader and President) to stand again, did not help them. Only at the last minute was Lula prevented from standing due to some legal technicality - he's in prison having been found guilty of corruption. (As President, Lula had helped millions of poor. But got caught up in the corruption.)
Perhaps Bolsonaro will be able to start sorting out some of these problems. The BBC interrupted his desire to see opposition politicians tried in court as an attack on democracy, not as an attack on the widespread and deep routed corruption.
But like all politics, there are no 'perfect' candidates (ones that completely agree with me!). Some of his views are disturbing, such as his support of the military dictatorship.