It's one of the outstanding problems of the current world. Not only in Germany, but there are also even crazier countries that most people can't afford to buy a small apartment their whole life.
Old houses belong to older generations, and new houses are bought by rich people. Young people don't stand a chance, for some cities even not with a lifelong mortgage - unless they live in countries like Singapore which explicitly tackled this problem.