Of course war is a waste. Of course it could have been avoided. You can say that about most wars. You could say that about the Revolutionary War.
But, given that Russia attacked (again), and this time with the goal of total victory (because apparently Putin had no fear of Western reprisals), had Ukraine not fought back, it would have lost all of its territory, and the people who chose to fight would be under Russian rule now, and Putin would be looking at Moldova or another place to rebuild the USSR. The fact that Ukraine has stalled Russia is a victory of sorts. It was not for nothing...unless you value your life over freedom, in which case evil will always win.
You give our role too much credit. The US was willing to smuggle Zelensky out over night like the Russians did for Assad. We were willing to hand over Ukraine to Russia (after promising to defend Ukraine to get them to hand their nukes over to Russia.) They fight in spite of us, not for us.