I frequently talk with prospective clients who are thinking about applying for Social Security disability but are still working (and earning more than the 2023 SGA amount of $1,470 per month, gross pay).
These prospective clients sometimes want to discuss the likelihood of success for a disability claim, should they stop working and apply for benefits, and whether their particular medical condition can provide a basis for an award of disability benefits. I typically explain that it is not the diagnosis, but rather the severity of the symptoms from the diagnosed condition that will likely determine the success of a disability claim.
Once SGA work ends, you can apply for the disability benefits for which you have paid a premium through your FICA taxes over the years. But until that work ends (or falls below the level of substantial gainful activity), you are not eligible for Social Security disability benefits.