Tech companies operating in a country have to comply with said country’s laws. In the specific case of Brazil, compliance with judicial orders is not optional. I remember Twitter was blocked because Elon tried to be non-compliant by firing everyone and thus having no representative in Brazil. It obviously didn’t work. The US forced similar adjustment on TikTok and doesn’t seem to hesitate trying to impose American laws outside its territory.
Most countries consider mineral resources to be state-owned if they are located within their national borders. Bribing officials and installing puppet governments only takes you so far, and occasionally local governments grow backbones to allow them to oppose exploitation.
And courts in the US have no jurisdiction outside their borders. If there is a legitimate complaint, it can be brought to the WTO or other similar international court. Unfortunately, in order to avoid prosecution for war crimes, the US chose not to be part of the ICC.