There are more flats in some other countries, but they also tend to be bigger. One example to put it into context is that the average size of a property in New York City is actually no smaller than the average size of a home in the whole of our country!
Homes aren't expensive just because they're privately built. Remember the advice that's often given out in this forum to sellers "your house is only worth what someone is willing to pay for it". People are willing to pay so much for a house because they have so few other options.
If we had built at a comparable rate to other European countries over the past 50 years, we'd have four million extra homes. Those homes would mean fewer children inappropriately sharing rooms or even beds with siblings and parents, more space for people to enjoy their lives and hobbies, and more headway for couples to start families.
I'm all for social housing, but all home building contributes to addressing the shortage! There's no need to pit one against the other.
Even if it's seems like a new home built near you is too expensive, you've got to imagine the counter factual. A couple that moves into a 500,000 pound new home doesn't disappear if the new home isn't built - they instead move into an existing house they think is slightly worse, outbidding the people who would otherwise have moved into that house, who then outbid someone else for another house and so on.
That's how you end up with converted flats in creaking old houses going for half a million+ in areas of high demand. Whoever built the house is long dead, you can't blame developer greed - it's supply and demand.