There is much to consider when deciding whether to buy a Single Family Residence (SFR) or a Condo. Size and space is one, which leads to a cost difference too. In general, Condos are much cheaper than homes, partly because you can't find 1 bedroom SFR's, and few 2 bedroom SFR's whereas these are the most common Condo sizes. But SFR's are more expensive mostly because you get much more space in an SFR even when they're listed as the same size as a Condo. For example, a 2 bedroom, 2 bath, 1500 SqFt Condo is going to be smaller than the same SFR where the SFR usually has a garage or basement area, maybe an attic and a yard, none of which are included in the Square Feet. Plus you get to store extra items in your garage or anywhere you choose.
The same can not be said of every condo where you may not have common area space, you may not have your own storage area. The rules may even say that you can't store anything in your parking space except a car. Not bikes, not anything.
So why buy a Condo? Again, they are usually cheaper. A 2 bedroom condo in District 7 of San Francisco (Marina, Pac Heights, etc) averages about $800,000. A 2 bedroom SFR is rare in this area, and probably starts at $1.2 million. The downsides of condos are that you share walls, may have a neighbor below you, and/or one above you.
If you can find a top floor Condo with as many as 3 un-shared walls you have a lot less noise or nuisance issues to worry about. Condos with "deeded" storage ("deeded" means you own it, you take title to it with your condo) will add to convenience and value and size. A shared yard, or common roof deck is a nice to have, but it not quite as valuable as your own yard or deck in your own house. However, if you can find all of those things in a Condo, while it will sell for more than other condos, it will still be cheaper than an SFR.
With condos you also don't have to take care of any of the common areas, most condos hire vendors to do landscaping, cleaning and repairs. Of course you also have forced payments, called HOA dues (Home Owners Association) to pay for common area expenses, including building insurance, but you'll end up paying similar amounts in your own home.
So size and space, vs. cost are things to consider when deciding whether or not to buy a Condo or an SFR. When using internet search tools to find homes, be sure to pre-select one or the other in your search like you can at www.SF-MLS-Search.com/welcome.php