I wouldn't say that we gave away billions to Ukraine (although there is the matter of the tens of billions that seem to have "disappeared"). The money might even be considered well-spent (again, except for any that was possibly stolen) if it helped to expose Russia's weaknesses and give them a bloody nose on the international stage (an injury that will feel a lot less painful if he gets what he wants from these negotiations, which seems likely).
Trump is taking advantage of Ukraine's (and the EU's) plight to get a favorable long-term deal out of it. The idea is that, if the USA has a vested (economic) interest in keeping it independent, it is worth it to Ukraine to agree to the deal. But if the deal does not include boots on the ground, it will remain very vulnerable to future Russian agression. If there is anything that shows us that Trump is not a politician, (or not a typical one, anyway) it's his willingness to make such baldly lopsided offers, knowing that there's a good chance he will get what he wants.
I'm curious how future administrations (especially Democrat administrations) will deal with all of these changes. But I'm in no rush to find out. There is one thing for sure: when Trump speaks of putting America first, he is doing so honestly and unapologetically. That's refreshing, to a degree.