Russia modernized its military with money they got from selling gas and oil to Europe. Finally Germany admitted it and at least will not increase its dependence on Russian gas.
I suspect if Germany would continued to develop its nuclear power rather than shutting it down, Russia would not have money for the new war. But then perhaps Germany was still grateful that Moscow allowed German reunification in 1990 and felt obliged to get gas from Russia.
Note also that Ukraine even after 8 years after loosing Crimea continued to transport Russian gas perfectly aware what Russia spent the money on.