Regarding what to do, the most important thing is to find a company willing to pay that amount.
1- Foreign companies usually pay more money than local ones, specially American. Obviously there are exceptions but generally speaking avoid them.
2- Outsourcing companies (the so called "cárnicas") usually are the worst places to work, for salary and for conditions in general... Usually companies where you build/maintain the product pay more.
3- For individual contributors technology matters a lot. Kubernetes pays well, crypto pays unreasonable amounts, rust in general is very well paid as well, AI, etc. Find your niche.
4- Experience matters more than education and open source contributions raise your value a lot.
I'd say those are the main factors that will determine a position's salary, so it's a matter of finding the right position and being the best candidate *for that position*.
As for the technology I've been doing kubernetes for about 8 years now (that's before 1.0 was released). For this experience my salary is not insane at all, counting bonus and stock I was making about 35% more in my previous job, but I was quite tired of being a sysadmin and moved back to programming and that involved doing a pay cut.