Here are numbers for you. The Sabine Pass LNG project in Louisiana, USA, was constructed for about $5 billion. Its capacity is almost exactly the same as the Nord Stream 1 pipeline, which was constructed for approximately €15.7 billion. Thus for 1/3 of the cost of the pipeline, Germany could have provided themselves a backup plan for Russian gas, while requiring zero changes from industry and consumers.
This one time investment would have been a fraction of what Germany spends each year subsidizing renewable energy, and a drop compared to the cost of shutting down nuclear. Therefore the cost of making sure that there was a second supplier of gas available would have been quite reasonable to do some years ago.
Given that it hasn't been done, it is impossible to do on short notice. But Germany could have done it, should have done it, and was repeatedly advised by allies to do exactly that. And failed to.