While you are working, your employer is supposed to withhold money from each paycheck that is then paid into the Social Security system on your behalf. That money adds up to give you “quarters of credit” and make you “insured” for SSDI. The SSA can tell you at what point you worked enough to qualify for SSDI.

Once you stop working, you stop paying into the Social Security system. After a period of time, your “quarters of credit” run out and you can no longer qualify for SSDI. The date on which your credits run out is your “date last insured.” The SSA can also tell you what that date is.

If you become disabled, you have to prove that you became disabled before your date last insured.

You can find more information here: https://www.ssa.gov/benefits/retirement/planner/credits.html