Security Clearance Valid after discharge?

I understand that a confidential security clearance needs renewed every 15 years, but what about if you are discharged from the military? I’m interested in a government contractor job that requires a security clearance. If I just recently got discharged, would I have to go through another security clearance process? I understand that it is invalid once you stop using it, but can be reinstated if it is used again within 2 years. Does it matter if the discharge is OTH? My original clearance was done in 2009, so the 15 year mark would be 2024. Is this correct?

Very few positions are designated as needed a security clearance at the confidential level. The majority are cleared at the Secret level and even fewer at Top Secret. The clearance is based on an in-scope investigation at the required level e.g., Secret requires an ANACI, NACLC, or MBI depending on the position.

The OTH discharge may affect being eligible for a clearance depending on what the reasons for the discharge were. Employment misconduct or other issues may be disqualifying.