衰亡 marks the long arc from decay to extinction — used about empires, dynasties, civilizations, languages, species. Compare
灭亡 (mièwáng, 'to perish / be destroyed') which is sharper and often passive (a state being conquered), and
衰落 (shuāiluò, 'to decline') which describes weakening without necessarily reaching extinction.