TLDR bullet points:
1) Russia overextended.
2) Ukraine has all the morale and motivation, Russians don't even know why they're fighting.
3) After the annexation of Crimea a few years back, NATO has been training Ukraine. In only a few short years they went from a pushover to the gigachads they are now.
4) Russia is still stuck in the WW1 era of military tactics. They aren't fighting trench warfare anymore, but they still have a very strict command structure where the generals operate on the frontlines. This means they are vulnerable to getting shot.
4b) Russia does not encourage free thinking in its underlings. So when a general gets whacked the entire battalion falls into disarray. Even now, as generals are hightailing it to the backlines as a Russian general is now an endangered species, the troops up front still rely entirely on their orders and are left derpfaced until a generals calls in to tell them to do something.