Ukraine got on the bad side of Russia because it was trying to do just that. It gained leadership that was willing to develop stronger ties with the West and Russia perceived it as a threat, annexing Crimea as stage-1 in their plan to eliminate Ukrainian sovereignty.
Instead they might simply have played nice, continue being the region's key supplier of natural gas/oil/etc., Used those proceeds to develop other areas of it's economy... You get the idea. Their leadership's nostalgia for empire building is, ironically, getting in the way of them building an economic empire. Their scientific tradition should have them at the forefront of new breakthroughs alongside other large nations. Instead, we get a fruitless invasion and another generation of isolation.
"Continue being the region's key supplier of natural gas/oil/etc" is not enough for Russia.