And if this comes down to resources then Russia loses.
Debatable. Countries can take on debt, if need be, to fight wars. The more debt you take on the more interest you have to pay on that debt. Countries fail when they can't pay the interest on their debt. It is known that the US and various Western European countries are already living near their limits.
Here are some quotes:
Russia: "In 2021, the national debt of Russia amounted to about 17.02 percent of gross domestic product."
US: "US Government debt accounted for 126.7 % of the country's Nominal GDP in Jun 2022,"
UK: "Now Britain is in the 100% debt-to-GDP club, what’s the spending plan?"
Italy: "Italy Government debt accounted for 152.6 % of the country's Nominal GDP in Mar 2022,"
All biggest Western Countries and allies: "Developed countries in the 100% club are a motley lot: Cyprus, France, Belgium, Spain, Portugal, Greece and Italy, plus Canada, Japan and the US."
So Russia might have a larger relative credit card to rack up debt on. The US and the biggest NATO countries are known to be spend-a-holics who are living at the limit, largely due to massive welfare and socialist programs enacted by liberals who do not care about fiscal responsibility. It is quite possible that fiscally conservative Russia can start spending on their credit and outspend them all. Also, $100 USD goes a lot further in Russia than in the US and UK. It's more like $500 based on what you can buy with it.
At this moment it's primarily about 6 almost insolvent countries vs. 1 (Russia).
If China and Brazil team up with Russia, as they have been suggesting recently based on UN votes on Russia condemnation and sanction, it may spell significant trouble for NATO. Those countries are fiscally conservative, do not overspend on welfare programs, and have much lower gdp to debt ratios than the US or Western European nations (~50% debt to gdp).
I think it might paint a clearer picture to consider absolute gdp instead of percentage of debt. Our media sort of paints a picture of the West being a lot more helpful to Ukraine than we actually are.
Let me throw out a few things to put things in perspective:
The US has committed around 60 billion to Ukraine. I think we've actually delivered about 14 billion. This number is deceptive though. Quite a bit of this was equipment that was obsolete and costing us money to maintain. Most of it was a sunk cost. It's hardware that we've already built to fight a country like Russia. There really isn't a reason to replace it.
We suffer about 150 billion a year in hurricane damage. So hurricanes are a bigger drain on us than Ukraine is by somewhere between 3 and 10 times.
The UK is in a bit of trouble but that's mostly from stabbing itself in the face with Brexit and massive tax cuts for the rich.
Russia and China are not friends or even allies. China stands more to lose by severing ties with us than they do by helping Russia. I don't know much about the geopolitics of Brazil.
There's a cost to this whole to the whole world regarding various supply chain disruptions but that's here to stay. Even if the war were ending tomorrow a lot of countries would still refuse to trade with Russian since the mask is off now. They're an unreliable and hostile trading partner.