Getting a work permit or visa that allows work is hard in most countries that might be more attractive than Brazil.
There’s no shortage of web developers unless you’re a senior developer with specialized skills, degree, and good work history.
Language and cultural issues will complicate getting f/t or p/t jobs.
I suggest you look into freelancing remotely for companies in countries that pay relatively well for your skills (US companies generally pay more). Then it doesn’t matter where you live and your don’t need a work permit.*
*Technically you do usually need a work permit to legally do any kind of work for pay, in every country, but enforcement focuses on people working illegally and taking jobs from locals. Some countries offer visas that allow this kind of work. Freelancing on a laptop for a company in a different country isn’t likely to get you into trouble. That’s the whole digital nomad model.