There's a lot that can be done. The most obvious thing to do is remove rent control and zoning restrictions and push for the construction of higher buildings with more units. Stop living in the past and pretending it's a quaint coastal town.
San Francisco is statistically the second most dense city in the US, wedged into a geographically bounded ~50 sq miles. It's dumbfounding that there were probably more high rise apartment buildings (>20 stories) in my zip code back in NY than in all of SF.