Just wanted to expand on this
Depending on the program/insurance type, it might require that you can’t hold down any meaningful job, caused by a medical condition that lasts longer than a year.
For SSI or SSDI, you basically have to be bed bound (“less than sedentary”), statutorially blind (corrected visual acuity 20/200 in the good eye), have a condition severe enough it meets the strict requirements in SSA’s listings of impairments, or have a mental condition that prevents you from being at all able to fulfill the demands of unskilled work. The rules get more lenient after age 50 the older you get though.