Territory is a fairly unimportant gauge of a nation's capabilities these days.
This is not about gaining more territory. As John Mearsheimer said, a nation with global hegemonic ambition like the U.S. will never tolerate another independent power, especially one as big as Russia. So if they tolerated Ukraine turning West and killing off all the ethnic Russians in Ukraine, the next step is the break up of Russia. This is zero sum game of strategic competition. Maybe it won't happen tomorrow, but someday when Russia is weak, we would gun for the break up of Russia. Putin saw a chance to push back against the U.S. and he seized this opportunity. Unlike Erdogan, who appear to not understand resource constrains when he try to expand the Turkic sphere of influence, Putin understands the economic limitation of his country. Just look at his past wars with Syria, for example. He was very careful with limiting the scope of the wars.
Russia is a resource state. Putin did his best to change the economy but at the end of the day, they have been mainly selling resources and weapons. They are losing the weapons trade. There is no chance that Russia will become a manufacturing power like China. If they continue to ally with China, there is no need for them to become a manufacturing nation. Canada lives very well not doing much manufacturing. As such, the longer term implication of blocking them out of SWIFT would be dire for the U.S. and Europe. If the resource market were mainly from the West, I don't think he would have these wars, but being able to sell to the Chinese gave him this option.
National security always trumps economics. I think Putin tried to secure his nation from being screwed with by the West with these wars. Maybe Russia will not fall while he is still in charge, but you have to ensure that to be the case even if another Gobachev were to come to power in the future.