Everything you said applies today to the demographic pyramids of the respective 2 countries, with only an 11 years delta. And yet Germany has 5x the GDP.
https://www.populationpyramid.net/turkey/2019/
https://www.populationpyramid.net/turkey/2030/
https://www.populationpyramid.net/turkey/2019/
https://www.populationpyramid.net/turkey/2030/