Hello Arthur. Do not worry, this is a very common occurrence in home baking, and your dough can certainly still be put to good use.
The reason your dough smells distinctly sour is that it has over-proofed (over-fermented). When dough sits too long at room temperature, the yeast and natural bacteria consume most of the available sugars and produce organic acids, alcohol, and carbon dioxide. Over time, the gluten structure weakens and the alcohol and acids create that sharp, sour aroma.
Here are the clear steps to handle it before baking:
1. Deflate the dough: Gently punch down the dough to release the buildup of excess gases and alcohol.
2. Refresh the dough structure: Because the yeast has consumed its food and the gluten may be slack, add 2 to 3 tablespoons of fresh flour, a tiny splash of water, and optionally half a teaspoon of sugar. Knead gently for 1 to 2 minutes until smooth to introduce fresh food and restore elasticity.
3. Reshape the loaf: Form the dough into your desired loaf shape and place it into your prepared tin or proofing basket.
4. Monitor a shorter final proof: Do not leave it unattended this time. Because the yeast culture is already warm and active, it will rise quickly. Check after 20 to 30 minutes; it is ready when an indentation from your finger slowly springs halfway back.
5. Alternative option: If the dough feels too fragile or slack to hold a tall loaf shape, you can stretch it onto an oiled baking sheet, dimple it with olive oil and salt, and bake it as a delicious rustic focaccia or flatbread.
I hope this helps you salvage your bake successfully. Best of luck in the kitchen!