When the mapmakers redrew the Mideast map after WW1, they created Saudi Arabia and didn't give the Kurds a nation. The Balfour decision in 1917 was an English diplomat saying Israel should have a nation in the Mideast. All that pretty much mucked up the Mideast. It was supposed to be a solution to end all wars, instead it demonstrated that WWI never should've happened.
The Yazidis and others were doing fine until we and our allies opted for regime change initiatives, which destabilized nations and removed the heavy hands that kept the maniacs in check. Which nations benefit? Not us.
Something similar would happen if Afghanistan if we pulled out altogether.