https://en.wikipedia.org/wiki/International_sanctions
For the US, congress is supposed to approve of wars but that has not always happened either.
"It has been alleged that the War Powers Resolution has been violated in the past – for example, by George W. Bush invading Iraq in 2003 or by President Bill Clinton in 1999, during NATO bombing of Yugoslavia."
Allowing the UN to enact sanctions (or conduct armed warfare) does not prohibit or preclude UN member states from doing so on their own.
In a technical sense, the above quote is true, but only because it's limit to "that must be complied with by all UN member states." Sanctions imposed by other entities do not have to be complied with by other UN member states, thus only the UN can impose UN sanctions... a bit of a tautology.
Are you saying that war is illegal unless approved by the UN, or this specific means of war?