Afghanistan has been a mess for long before 9/11. But the United States and other Western forces began their actual attack on Afghanistan after the attack on America on 9/11. The goal was never crystal clear from the beginning. What was clear was that capturing Bin Laden was the goal. What was unclear was whether destroying the Taliban was also the goal. Or was it sufficient to weaken the Taliban and destroy their leadership? Due to unclear motives, there was never clarity about when to end activities in Afghanistan. It took nearly 20 years to get out of Afghanistan, and the ending was a mess.
9/11 proved to nearly everyone that the Atlantic and Pacific Oceans were not sufficient barriers to enable the United States to live at peace. It could be hit from the inside or from the air from a travelling bomb. It was a wake up call that George W. Bush responded to. He led the United States into a foreign country and did indeed destroy a lot of the Taliban infrastructure. But the Taliban, like other radical Islamic militants live in a constant state of war. They are able to be weakened for a decade or two and then still get up and recover. That is exactly what happened.
The United States and it’s Western allies tired of being involved in a forever war and basically ran away, leaving billions of dollars of equipment. The Taliban trounced on the opportunity and took over Kabul. We are not back to where we were in 2001. We now have created a well-armed terrorist country that doesn’t know how to use all of their expensive weapons they just took over. The geopolitical situation in the Middle East just took a major step backward, and the repercussions will be felt for many years.
America can decide to take an isolationist stand. But one day, there will be an FDR who will rally the United States to fight back. Otherwise, no matter how wealthy the United States is, China, Afghanistan, and whoever else allies themselves with them will pose an existential threat to the Western way of life.