How should Germany have done that? Import tax on Russian gas? Laws preventing importing cheap gas from the east? Sounds a bit aggressive towards our big neighbor to the east.
Germans maybe were naive to think (up to until this summer) that Russia would need the money as much as we needed the gas. Still from the grand scheme of things (fossil fuels need to end anyway, gas is better than coal for climate, trade is better than no trade) the idea to partner with Russia made a lot of sense.
Europe benefitted from cheap gas over the last decades and it will be somewhat affected by higher prices for this and next year, but it will accelerate the transition to renewables and strengthen nuclear in those countries in Europe where it is still an option. In the end it will push Europe in the right direction.