Top contenders for the 2024 presidential election in recent weeks have accused each other of jeopardizing Social Security and Medicare, key entitlement programs for seniors.

The future of the programs has been fodder for endless political debate — and distortions — because of the long-term financial challenges they face.

Social Security’s main trust fund is currently projected to be depleted in 2033, meaning the program would then be able to pay only about three-quarters of total scheduled benefits. Medicare, for its part, is at risk of not having enough money to fully pay hospitals by 2031.

President Biden, former President Donald J. Trump, Nikki Haley, the former governor of South Carolina, and Gov. Ron DeSantis of Florida are among the candidates zeroing in on those vulnerabilities, often by referring to one another’s previous positions.