"Affordable housing" (sub-market rate lotteries subsidized by increasing the cost of market rate housing) is IMO more of a NIMBY policy than a YIMBY one. The net effect is market rate housing gets more expensive, which hurts everyone except the lucky lottery winners.
Here's the thing, cities do not get cheaper when density increases. The reasons are complicated, but the end result is that not a single large city in Europe, US, or Japan decreased the housing costs by "just building more".
If you want to decrease costs, you have exactly two options:
This. Demanding new developments all be affordable housing is a strategy NIMBYs use to prevent new construction, since most builders will just go elsewhere.
If a builder does try to comply with the demand, they come up with other reasons to block construction (doesn't match neighborhood's character, not enough parking, demand yet another environmental review, etc.)