Hello,
I was advised to go to a post office or some other place (that I've forgotten), in order to obtain my CPF number.
First off, I wrote ‘CPF number' because it seems that they no longer give you card, but you get it in electronic form, to be printed out, and apparently there's also an app. Unfortunately i can't install the app (or not even view its description in the App Store), im getting a ‘Wrong Region' error. Which is a little bit strange, since my understanding is that this app should be available to anyone who has a CPF (I think it's similar to the vaccine certification apps around the world). If that's true, there should be no such restrictions. I wonder if it's the same for Android devices…?
But either way, here's the address to apply for a CPF number online (specifically for foreigners, there's another address for Brazilians) https://servicos.receita.fazenda.gov.br … efault.asp
I will let you know if and how that works.