If Russia prevails in Ukraine now, in a decade they will be looking at invading Poland or the Baltics
I very much doubt Russia would want to invade Poland or the Baltics, unless they decided to up the ante and openly threaten Russia.
Remember, the US has 900 overseas military bases. Russia has 1 (in Syria).
Regarding Ukraine: "The background was that President Putin declared in the autumn of 2021, and actually sent a draft treaty that they wanted NATO to sign, to promise no more NATO enlargement. That was what he sent us. And was a pre-condition for not invade Ukraine. Of course we didn’t sign that."
– Jens Stoltenberg, NATO Secretary General, 11 September 2023.
Now, imagine if a country decided to put missiles in Cuba...oh, wait.
Did Ukraine openly threaten Ruzzia then? I must have missed that! When was that 2014? or more recently?

What about Georgia in 2008? Did they openly threaten Ruzzia?

NATO's response to Putin's demands should have been
Opps off, you don't tell us who joins us or not!, which of course may well have been the communique through the back channels and as to his treaties, most sensible people know that they wouldn't be worth the paper they are written on!

I wonder if we would be where we are now if Ukraine had joined NATO years ago? I wonder what might be happening in the Baltics if Latvia, Lithuania and Estonia had never joined NATO?

Not sure what the relevance of the US bases is either, but a quick search shows that Russia has military bases in Armenia, Azerbaijan (Artsakh), Belarus, Georgia (Abkhazia & South Ossetia), Kazakhstan, Kyrgyzstan, Moldova (Transnistria), Syria, Tajikistan, and of course Ukraine. The Sevastopol naval base in Crimea probably being the most well known in Ukraine's occupied territories, but apparently Russia has at least 18 bases in Crimea alone.
Then there's Russia's activities in Africa via the Wagner Group and apparently Russia has plans to build military bases in Central African Republic, Egypt, Eritrea, Madagascar, Mozambique and Sudan.
Wiki LinkyEven your Cuba point is daft. Russia has form for invading it's neighbours (going back centuries), which is why they all joined or want to join NATO. Finland and Sweden of course being the latest to join, so by his own stupidity Putin has more NATO on his doorstep than he has ever had!