>In Slovenia an engineer with 10 years of experience makes $24,000/year.
>In Silicon Valley an engineer with 0.5 years of experience makes $100,000/year.
Come on, you've got to compare like with like. In Montana, the median is ~$60,000, and in Georgia ~$80,000. [0] and [1]
Here in Poland, I can find decent enough programmers who'll accept $2k/month salary. Their English will be poor, and typically they'll be based in the middle of nowhere.
If I want to hire someone good in the capital city, Warsaw, I'll need to look at paying a minimum of $4-$5,000/month -> ~$50 - ~$60,000/year.
(I've no idea what it costs to live in Montana; I'd hazard a guess that combined with a (freelancer's) 19% flat tax rate + $300/mo social security, your savings will grow faster here than there)
One other area of confusion can be salaries quoted before and after tax. I know it's common to use after tax figures in Poland, and I'm not sure if your $24k is after tax; the figures you read about jobs in the US are definitely before tax.
[0] https://www.sokanu.com/careers/computer-programmer/salary/Mo...
[1] https://www.sokanu.com/careers/computer-programmer/salary/Ge...