Perhaps so. And yet a couple decades ago when the war against Iraq turned into a quagmire, many political pundits also marked that as the end of the American Empire. And yet today the USA remains the sole globally dominant superpower. Our time will end eventually but we should be skeptical of any predictions on timing.
Empires don't die overnight, generally. Empires die slowly, violently.
We spent an estimated $8 trillion on so-called "War on Terror". The Taliban were in charge of Afghanistan before we started. They're in charge now. For $8T. 1% of that would end homelessness. 1% of that annually would be free college. I would mention universal healthcare but that would actually save money vs what we now spend so I'm not sure how you count that.
The kind of transformation China has seen in recent decades is what you're talking about with $8 trillion.
A despite the 20 year quagmire that was Iraq and Afghanistan, IMHO this war on Iran is an even bigger geopolitical clown show and will be more consequential to the end of American Empire.
You seem to have missed since then the massive transformation of China.