Several factors increase the risk of developing XDR-TB, including inadequate or incomplete treatment of TB, incorrect prescription of treatment regimens, poor adherence to treatment protocols, and the use of low-quality drugs. Additionally, individuals with compromised immune systems, such as those with HIV/AIDS, are at higher risk.