Not to put too fine a point on it, but even Alexander himself failed in Afghanistan. The Persians tried for centuries, and always failed. The Caliphate was the most successful, but only because they never wanted any kind of real change. The place is just unique.
The thought that we were gonna go in there and change things was probably ill considered at the outset. When you objectively consider the historical record of the people of Afghanistan. Force was extremely likely to not work. I believe there doesn't really exist anyone out there with a good idea on anything that could have worked. In the end, we left. Just as everyone before us did. And I'd be willing to go on record now and say that everyone who goes into Afghanistan after us will leave Afghanistan in the end as well.
It's never as simple as, "more bombs", "more money", "more education", etc etc. Afghanistan is a unique problem, that is uniquely resistant to all of the common solutions.
It’s simply not true that everyone failed in Afghanistan- the Mongols were very successful and the Mughals after them created a roughly 600 year period of relative peace. They just understood the realities of that region and operated in ways that modern western nations (thankfully) aren’t willing to. The fact we tried a different way was admirable despite ultimately being unsuccessful and a poor allocation of resources.
Relevant wiki quotes:
“In the Mongol invasion of the Khwarazmian Empire (1219–1221), Genghis Khan invaded the region from the northeast in one of his many conquests to create the huge Mongol Empire. His armies slaughtered thousands in the cities of Kabul, Kandahar, Jalalabad etc. After Genghis Khan returned to Mongolia, there was a rebellion in the region of Helmand which was brutally put down by his son and successor, Ogedei Khan, who killed all male residents of Ghazni and Helmand in 1222; the women were enslaved and sold. Thereafter most parts of Afghanistan other than the extreme south-eastern remained under Mongol rule as part of the Ilkhanate and the Turko-Mongol Chagatai Khanate.”
And:
“From 1383 to 1385, the Afghanistan area was conquered from the north by Timur, leader of neighboring Transoxiana (roughly modern-day Uzbekistan, Tajikistan, and adjacent areas), and became a part of the Timurid Empire. Timur was from a Turko-Mongol tribe and although a Muslim, saw himself more as an heir of Genghis Khan. Timur's armies caused great devastation and are estimated to have caused the deaths of 17 million people. He brought great destruction on Afghanistan's south, slaughtering thousands and enslaving an equal number of women. Allied with the Uzbeks, Hazaras and other Turkic communities in the north his dominance over Afghanistan was long-lasting, allowing him for his future successful conquests in Central Anatolia against the Ottomans.”
The Mughal empire rose out of this and ruled until the 1800’s.
See: the Roman Empire. They had a timeline of several hundred years before the new territories were ‘roman’