Each apartment may cost less than the house that was there before, but the value of property together (land + apartment building + individual units) is sure to cost more than when only a single home was on it.
Condo owners, on the other hand, would see the value of their units decrease with the extra competing supply. This, of course, being one of the benefits of YIMBYism for everyone else (increases affordability).
This is an exception more than a rule, and generally only for specific areas that might be gentrifying or for home owners in very old properties that might border a larger land area a developer might buy.
And then you always have holdouts which could spoil the deal, which leads to IMO one of the most evil government things there is in the US in modern times—eminent domain
Sorry it’s a purely evil thing. Specifically designed to rid poor people of property to enrich the pockets of wealthier people. Hell, Donald Trump was the biggest cheerleader of its use in the ‘90s.
I haven't conducted a comprehensive study, but my general sense is that the value of any given housing unit correlates fairly positively with density. An average sized single family house in the middle of a dense city is generally going to be worth way more than the same house located in an exurb. I'm sure there are counter examples, but I'd be willing to bet that for the most part, the denser the area, the more valuable the housing.
Basic supply and demand might suggest the value of your house would go down the more housing is built in your neighborhood, but that ignores that more housing might create even more demand because the increased population and density makes it a more desirable place to live. And if you own lower density housing from before all that growth, your house can demand a premium for people who want the benefits of density but are able to pay for more space for themselves.
As someone with progressive politics, I believe this is a huge problem.
If simply everything was getting developed, then the impact would be much more distributed.
There is also systematic bias and failure in the property assessment system. Strongtowns has been doing a lot of work on that.