The difference after an earthquake comes down to money, and money decides almost everything else.
A More Economically Developed Country has the funds, the equipment and the standing buildings stock to repair damage quickly. Roads reopen, hospitals are patched up, and reconstruction is measured in months.
A Less Economically Developed Country often cannot rebuild at all without outside aid. Destroyed houses stay destroyed, people remain in temporary shelter, and the secondary effects, contaminated water, disease, lost schooling, run far longer than the shaking itself.
Building standards widen the gap further. Wealthier countries can afford earthquake-resistant construction in the first place, so less of their housing collapses to begin with.