As are all wars, no? The US sought UN approval to attack Serbia in 1999. When the UN refused, the US attacked under NATO auspices instead, in a war that resulted in the deaths of over 10,000 civilians -- three times as many as actual combatant troops killed. The ostensible reason for the US attack was to stop the Serb's ethnic cleansing of Albanians in Kosovo. Instead, the action simply reversed its direction, with Albanians killing or driving out Serbs instead. I mention Serbia because a similar situation exists in Donbas, Ukraine, with Ukrainian nationalists attacking ethnic Russians and vice versa, in a conflict that's lasted nearly a decade, and consumed many civilian lives.
Of course, Putin's motivations for invading Ukraine are less about Donbas and more about preventing Ukraine from allowing NATO bases on its territory. Is Russia "justified" in doing so under international law? No -- but neither was the US justified in keeping Russian missiles out of Cuba, or in invading Grenada in 1983 to "keep out the Communists", or invading Syria in 2017.
So yes, as you say, it's a very complex situation, and one which could have been averted by better diplomacy on both sides. Personally, I fail to see the reasons behind the US's relentless insistence on shoehorning Ukraine into NATO, despite the risk of nuclear war for so doing.