In the classical world of economics, Earth is little more than a glorified auction house. If more people want something, they will bid up the price to get what they want. However, when supply increases more than demand, buyers will demand lower prices. Fewer buyers = less demand = lower prices.
After Putin invaded Ukraine, there was an impressive unified boycott of the Russian economy. Therefore, the world needed less Russian currency, Rubles. When demand for the currency dropped, the value of the Ruble dropped from about 85 per dollar to a mere 125 Rubles per dollar. In other words, the dollar could buy about 47% more in Russia than before the invasion. Conversely, this raised the prices of imports into Russia, igniting even more inflation for Russian families. To combat this, Putin demanded that buyers of Russian oil/gas pay with Rubles instead of dollars, despite the contractual language requiring payment in dollars or euros. Paying in Rubles obviously would increase the need/demand for Rubles, causing the Ruble to appreciate or increase in value, holding down the cost of their imports, weakening inflation in Russia.
So far, this has worked, as oil buyers started stock-piling Rubles, causing it to appreciate, reversing its depreciation. I thought it was a clever way to get around one sanction, but it is likely to be only a short-lived success.