On an absolute basis, SF has horrifically restricted housing policy that makes it incredibly difficult to build new, denser housing. However, compared to the broader bay area, SF has incredibly progressive housing policy.
It is ridiculous to compare downtown Houston, which is surrounded on all sides by a zillion square miles of suburbs (under city control!), to SF, which is surrounded by a limited number of more expensive and more restrictive enclaves that SF has no power over, and most of those places are a bridge or tunnel away. Obviously there is going to be less demand, and less premium for land if there are 10,000 other plots within 30 minutes. That just isn't the case in SF.
If the bay area as a whole had better housing policy than it would help SF a lot. But they don't, so it makes it worse for SF. And SF has no control over the housing laws passed in other counties. SF is of course partially at fault, as they should have better housing policy themselves, but they are not entirely responsible for the problem.