The US did not lose in Iraq and it didn't kill hundreds of thousands of civilians.
Iraq today is a free-standing nation, capable of charting their own path, courtesy of their significant oil revenues. The US is no longer required to prop them up and the US does not dictate their policies nor does it occupy the nation.
The civilian deaths you're referring to were the result of a civil war between the Iraqi people. They were killing each other. The long oppressed Shia majority and the Sunni minority. That's not uncommon throughout history, see: US, Russian, French civil wars, to name a few prominent examples. The US also butchered itself in a civil war, we were no better in our internal conflict. The French, British and other European powers were not morally responsible for those deaths, despite the elaborate roles the European empires played in helping to cause the US civil war (eg European slavery), as well as influencing or shaping the US colonies and infant US nation.
It took many decades for the US to organize itself properly after its founding, it was a very messy process. And even then, it ended up in a bloody civil war, before a greater degree of stability was achieved. Why should Iraq be held to the absurd expectation of instantaneous, miraculous stability so soon after regaining their independence from Saddam's dictatorship and then the chaotic US & allied forces occupation? Iraq is commonly treated quite unfairly in judgment when it comes to a political process that can take a long time under the best of circumstances; they're held to an unreasonable standard that just about no nation could live up to, especially given the context.