The US has plenty of oil and didnt need to go to those places to get more of it. We destroyed Iraqs oil pipelines and infrastructure in that war and a lot of it still is in need of investment in reconstruction today. Likewise Afghan oil production is a recent thing like in the last 10 years, and today the taliban government sells those mineral and oil extraction rights to chinese companies. If the goal was to get at those resources for American companies, we clearly failed. It seems China’s belt and road imperialism works better than our bomb the civilians and overthrow the government for a puppet method.