It can. Social Security looks at many factors affecting whether you can work, including your age.
When you’re younger and you experience a health problem that sidelines you from your current job, Social Security might decide that you still have the time and ability to adapt to a different, less strenuous job. So you can’t get disability benefits.
When you’re over 50, Social Security is more likely to conclude you can’t work at all because you can’t continue in your most recent job or be able to retrain and switch to a different one.
To make sure Social Security clearly understands your situation, work with an experienced disability lawyer.