"illegal" is a slippery concept in what people call international law. Partly of course because most of it is treaties between nations, and thus it's more like contracts, but of course without the over-riding force of the courts, and with no sensible way for the contracts to be enforced.
Also there is the rather rickety notion of "sovereignty". Many nations are not fit for purpose, yet we "respect" their right to behave in ways that would result in prison terms in a civilised country.
Also many people don't accept the symmetry of sovereignty in that if the poeple in a country do bad things that they are collectively guilty.
Saddam Hussein was an extremely unusual political leader. He killed people personally. GW Bush and Clinton ran away from their country's wars.
Both Hitler and George Bush snr served their countries bravely before political office.
But Saddam did not invade Kuwait, attack Iran, or gas anyone at all ever, certainly not the Kurds.
Iraqis did that. You can't run a war even as well as a Moslem country without the mjaority of people willing to go laong with it.
Afghanis are frankly incapable of running a country, and no one of any race including even the Chinese has tried to run a bit of Africa without screwing up big time.
Does that justify our actions in Iraq ?
Probably not.
But Iraqis have behaved appallingly to anyone who fell into their power, including and especially other Iraqis.
Rather than saying X are the good guys amd Y are the bad guys what we have is a system where pretty much everyone involved is at the very least dubious, varying from the French who sold Saddam nuclear reactors, the German who built his bunkers, the Americans who helped him get & stay in power, then lied about his WMD, and the British who elected a fuckwit who was outsmarted by Geroge Bush into believing Iraq was a threat to anyone we cared about.