We have what we have, and undoubtedly 9/11 was the result of Cold War squabbles in Afghanistan.
That said, it might surprise you that, given the powers of God, we'd kill the Taliban leadership and squash al Qaeda camps in the mountains bordering Pakistan, then yeet outta there leaving our nominal Northern warlord "Alliance" deal with the aftermath. You know, basically what the status quo was pre-Soviet action there.
Then I'd have had us not even bother with Iraq, or Libya; we'd have postured more towards India to ramp up pressure on Pakistan to cooperate with us far better on cracking down on the terrorists their side of the Afghani border.
All of this is a literal pipe dream, however, and probably impossible given actual situations in politics at the time. But that isn't what you asked; I answered the question posed.