Can the market 100% solve all housing problems? No, probably not. Can the market solve A LOT more housing problems than it currently is? Yes, absolutely. The market is hugely constrained by government enforced zoning in a huge number of places right now. It's the primary housing issue of our time.
I don’t know generally that zoning laws are the problem in Berlin but famously voters fought against adding housing units at the old airport vs the communal parks that were there:
I can't speak for Berlin, but it's basically illegal to build new housing in sufficient quantities in virtually every major American city. Due to this fact, prices have shot up everywhere.
The entire state of California now has a housing crisis with > 30% of residents spending more than a third of their income on housing.
Some estimates indicate that the US as a whole has underbuilt by around 5M units of housing. There are quite a few causes to this, but exclusionary zoning is definitely one of them.
Is your claim that fewer regulations would result in a net increase in affordable housing stock?