Afghanistan unlike Iraq was pretty clear though. Bin laden was hiding there and the Taliban were refusing to give him up also Afghanistan was in a state of permanent civil war and the Taliban government was not recognized internationally . So US wasn’t exactly invading a sovereign country (unlike what happened with Kuwait, Iraq II and the Ukraine).
It is clear that afghanistan was a problem in this situation, but it's not clear that going to war was a good or justified solution to the problem. Just my 2c.
I think the parent comment was saying that Iraq was invading a sovereign country in the Gulf War. I can see how the comment could be parsed as saying America invaded the sovereign country of Kuwait, but given the third example is Ukraine I think the parent was just giving 3 examples of invasions of sovereign countries in general and not just invasions by the US.