Why do economic basketcases like Argentina, Lebanon, Turkey not collapse but Sri Lanka collapses at the first sign of trouble?
Couple of reasons.
For country like Argentina they export agricultural products and mineral resources.
Argentina's population is also extremely very low compared to its size, so they can do by.
Argentina's economic policy are very stable they don't make radical changes and stick to things that work. Argentina also has a huge remittance.
Lebanon is money laundering paradise. Lebanon also exports a lot of natural resources and have substantial agricultural output with respect to its population (which is also very low). Tourism is important but is not the most important source of revenue. Their economic policy is also stable. Lebanon also get lot of financing from other Muslim countries.
Both Argentina and Lebanon doesn't have to worry about debt repayment as Sri Lanka which is a major drain for Sri Lankan Forex reserves. Sri Lankan thought tourism for PRC and rest of World will help negate this but then COVID-19 happened.
Turkey is highly industrialized. Turkey exports both high technology (cars, electronics, avionics, UAVs) and low technology (processed raw materials, etc) products. Their tourism is well established. They have enormous Forex reserves. Their population is low and they don't import agricultural or petroleum product much. Turkey has a huge technological advantage (and can be regarded as high technological country). To give you an idea Turkey is exporting UCAV while we are yet to get one operational.
Sri Lanka's population is very high compared to its export potential. Lot of Sri Lanka policies went wrong and some terribly wrong. Sri Lankan government miss calculated a lot of their policies.