That is something always misunderstood by some US military thinkers. Germany after WW2 was not a failed state. It was a poor state with an always working bureaucracy and a very low rate of corruption. Also with a good educational system and well educated people. The US did not need much personal to control the bureaucracy. Previously sending Jews to camps now the same clerks and judges selected the Nazis.
So the idea to transform states like Iraq or Afghanistan into some normal states with a low rate of corruption would have taken at least 20 years and a huge effort training clerks and teachers outside of Afghanistan to show them how bureaucracy works and what is the aim.
Since 1952 Germany always exported more than it imported. In 1960 the German unemployment rate was about 1 %. The War in Afghanistan was “over” by end of 2001. What happened since then? Poppy fields all over the country.
The first small errors were made after the then Soviet Union left Afghanistan.