The money we've spent in Ukraine is a pittance of our annual defense budget, let along our entire budget.
By supporting Ukraine over Russia's agreession here's some of what the US has gained:
1. Russia has shown itself to be a second class military power at best
2. Russia has had to expand tremendous resources for little gain
3. Trump left NATO fragmented and unsure. NATO is now unified with the US in the clear lead
4. NATO has expanded by two countries that border Russia. This in and of itself is a massive win and worth every penny
5. Russia's standing in the world has taken a massive hit as the rest of the world understands that Russia is like the tiny, yapping dog that can't do any real damage
6. Europe has replaced Russian energy with other sources. Even Trump saw the strategic value in this
These are just a few of the benefits we've gotten from spending just a few dollars while losing zero American troops.