From the Motley Fool:
… Look at social media message boards, and you'll find one commonly repeated viewpoint: That undocumented workers receiving benefits are to blame for Social Security's financial shortcomings. Immigration into the U.S., in general, seems to be a regular scapegoat for why America's top retirement program is struggling.
But this school of thought couldn't be more wrong.
Social Security's problem isn't that too many immigrants are flocking to the United States. Rather, it's that net-legal immigration has been declining for a quarter of a century. Since 1998, the net migration rate into the U.S. has fallen every single year, and is down by an aggregate of 57%, according to data from the United Nations.
Most people legally migrating to the U.S. tend to be younger, which is an extremely important point. These are people who will spend decades in the labor force contributing to Social Security via the payroll tax. The 12.4% payroll tax on earned income (wages and salary) was responsible for providing approximately $981 billion (90.1%) of the $1.088 trillion in revenue Social Security collected in 2021.
The intermediate-cost model in the 2022 Trustees Report -- the "intermediate-cost model" is what the Trustees view as the outcome likeliest to happen -- is based on average annual total net immigration of 1,246,000 people. Between July 1, 2012, and June 30, 2017, fewer than 955,000 total net migrants entered the U.S. annually, according to data from the World Bank. If net migration into the U.S. continues to fall, or even steadies at these reduced levels, it's all but a certainty that Social Security's funding shortfall will grow. …