I was divorced after 43 years. My ex is in prison for the rest of his life. He was supposed to pay me spousal support for the rest of his life. I went to court and the judge issued an order to social security for me to get his social security which is being withheld while he is in prison. Is there a law or statute that would support that. I need that support to live on.
No. You can't garnish a benefit that isn't payable, and your ex-spouse wouldn't be eligible to be paid his benefits as long as he remains incarcerated.
You could, however, still potentially be paid divorced spousal benefits if and when you qualify. That wouldn't require a court order, but in order to qualify for divorced spousal benefits you'd have to be at least age 62, unmarried, and not already drawing a higher Social Security benefit on your own work record (https://www.ssa.gov/OP_Home/handbook/handbook.03/handbook-0311.html). Auxiliary benefits (e.g. spouse, divorced spouse, child) can be paid on a worker's Social Security record even if the worker is incarcerated.