This effect is temporary, as the reorientation of European Union countries away from Russian oil and gas towards other countries and alternative sources disrupts established supply chains, intensifies panic, and then raises the price. Everything will soon return to normal, and then, in the medium term, Russia will suffer enormous losses from which it will never be able to recover.
I don't think that is even possible.
For example gas, there is infrastructure in place that transfers it easily from Russia to Europe. You can't just build another gas line all the way to another farther country. It takes years and the route should go through regions that are unstable. Not to mention that other sources like Qatar for example are not capable of producing 1/1000 of the same amount of gas that Russia is producing and countries that can like Iran are not going to sell it to Europe.
Buying it from elsewhere through other means would also significantly increase the price and won't cover the needs either. To transfer gas using a ship for example you have to first turn it liquid (LNG) which significantly increases the cost and the amount that would be shipped is still not going to be enough.
The problem is the same with oil.
They went to the Arabs and they couldn't increase their production any more. They went to Venezuela and they didn't comply and their infrastructure is already weak and US sanctions prevents them from improving it too so that failed too. They went to Iran that can both produce and ship more than enough oil but Mora met a middle finger 2 days ago so that's not gonna happen either.
Yes, sanctions are not economically beneficial for the countries of the European Union now, but they understand that it is better to take such measures now, but to get rid of the long-term threat from unpredictable Russia.
They haven't even begun sanctioning Russia. If you check the list of sanctions, 90% of them are jokes (like sanctioning Putin's ex-lover or the Russian cats from entering the Cat Show!) an the remaining 10% that target things like Russian energy or banks are not enforced since they are buying it using Russian banks and currency!!