My wife did an online master's degree (at a legit university that also had an online program). You have to be very good at self-pacing, diligence, and learning autonomously. You have to be so good at it, in fact, that the type of person who would succeed in an online master's program is the same type of person who would succeed in self-learning without the master's program.
So if your only goal is to learn, then I say no, it's not worth it.
However, you're in Brazil and not a lifelong programmer. Credentials may work against you if seeking a job in the US. Many US companies look at South America as the "nearshore" talent, much better in quality than devfarms in India, but also still cheaper and -- because of that -- slightly lower in quality than US talent.
In that case, spending $7k and completing the program and getting the degree may help you get a $7k higher salary in your first (or next) job. It may give US companies more confidence in your abilities, as you received a US graduate school education.
So from a financial perspective and the perspective of job opportunities inside the US as a foreigner, then I think it may be worth it. If you don't care about getting US jobs then still probably not worth it.
Best of luck!