The other two are superior courts, but they don't rule constitutional matters.
The reasons were (you can confirm by clicking on the link above):
Security and Secrecy of the Vote: The court argued that the printed vote would not maintain the current standard of security provided by exclusively electronic voting. The paper trail could potentially pose a risk to the secrecy of the vote, with the possibility of identifying which voter chose which candidate. This could threaten the free choice of the voters.
[I find this argument ridiculous to be honest. The paper trail is anonymous and there's no way it violates the secrecy of the vote]
Operational Difficulties and Costs: The court also noted the significant difficulties and high costs associated with implementing a paper trail. They argued that the potential benefits associated with the security of the electoral process were minuscule compared to the detriments stemming from the implementation of the measure.
Rapid Implementation: The court deemed that the law, which called for the immediate implementation of the paper trail in 2018, failed to consider the necessary time and resources for proper setup.
[For a country the size of Brazil, the 1 billion BRL (200 million USD) is actually cheap if it avoids the political distrust that the current e-voting system has - see what happened in January 8th with the invasion of Congress and the Supreme Court].