For everybody? Not without magic.
Economics of housing is econ 101: if there are more people than available apartments, prices rise so that at some point the number of people who can afford to rent becomes equal to number of apartments available to rent.
You can't house more people without building more apartments. That's the only way to provide housing for everybody. It becomes affordable as a side effect of building more apartments.
The other "solution", as practiced by NY, SF and apparently Berlin, is to artificially keep prices down with government regulations like rent control.
This strategy has been torn to shreds by Nobel-winning economics but more importantly it's clear that it doesn't work. SF's city government keeps talking about "affordable housing" since forever and yet we get to be in the top 2 of the most expensive US cities.
If Berlin follows the same "keep prices down, don't allow more buildings" strategy, it'll end up much more expensive 5 years from now.