For better or worse, the USA has basically made a contract with its people that "you have the right to a car, and because of that, we will provide really sucky public transit." That contract has to change before we start aggressively taking cars out of the system.
I can't imagine Americans submitting to a law like this.
That's somewhat optimistic. In the absence of rules, developers will maximize their profit above all else. Apartment units are far more profitable than parking, so they'll just build the maximum units with no parking.
I lived in such a neighborhood once. Result is 50 unit buildings with 4 parking spots. And the result of that? People driving around the blocks for hours looking for parking, fights breaking out over parking, cars constantly vandalized for taking over "their" spot. It was not fun.
Letting the developer maximize profits also lets residents choose residences without parking spots, to save money.
That doesn't provide any guidance to the builder though, so what should they build?
All of these can very easily be changed by future buyers if they prefer something different.
But if the developers builds a 50 unit apartment building with just 4 parking spots, that building is now there for many generations and there is no practical way to change that decision.