The morals of US actions in the middle east are debatable but there is one massive objective difference between them and Russia's invasion of Ukraine. The US went through all the procedure and protocol to make it legal under international law. They got ascent from other nations and put together a broad international coalition.
People always seem to forget that when they bring up Afghanistan and Iraq. That doesn't make it right but if you are going to condemn the US for it then you also have to condemn the UK, Canada, France, Germany, Belgium, Japan, Korea and a slew of other nations as well.
And if you do also condemn them then cool, good for not being a hypocrite. But it was still legal under international law so sanctions of any kind don't really make sense.