Another important feature that makes public transport suitable is that they developed concentrically, having only one city center.
With such city planning in mind, public transport is the only rational way to move around lots of people on narrow streets.
The US auto companies paid for the destruction of tram lines with the long term goal of selling more cars.
Regarding your question, if the city is made up mostly of apartment buildings & parks, with limited parking space available, almost everyone uses public transport.
There is obviously a trade-off between how pedestrian-friendly or car-friendly a city can be, thus if a city goes hard in the pedestrian-friendly (removing parking spaces, narrowing streets in the center etc.) direction, public transport becomes very attractive & convenient. Having a car becomes a burden.