There were several objectives to the Afghan War and the War on Terror:
1. Create instability in the Muslim World and around China to prevent any competitor from emerging that can challenge US economic or political power.
2. Destroy as much infrastructure as possible.
3. Keep the military-industrial complex happy.
4. Ensure sufficient oil supplies from the Middle East and allow Afghanistan to be a pipeline for Caspian Sea oil, if possible. (Karzai and Khalilzad were oil executive before their current roles.)
5. Strengthen the geostrategic position of Israel.
6. Ensure that the drug trade continues to provide dividends to various allies and agencies.
7. And most recently, to prevent the success of Belt and Road Initiative.
Yes, these objectives have been met. So the war has been a resounding success. But the cost of war in the trillions, the lost confidence by the American public, the lack of investment in American infrastructure because funds were diverted to the defense sector, and loss of prestige and moral authority on the world stage have been very damaging.
Was it worth it? Probably not. There were alternative paths that could have yielded better results. But this is how empires collapse. Wars, overspent treasury, lack of political foresight, inability to accept modern ideas, and internal corruption lead to collapse of institutions and then the foundation of civil society. The Romas were no different, nor the Arabs, Turks, Persians, Moghuls, or Egyptians.