Introduce a cheap alternative, get people used to it, then slowly phasing in taxes to make the undesired behavior too expensive to be worth it for the average person, but still give the option.
I have long thought that cars should largely not exist in cities, but (in America at least) they're required for rural living. Inside cities, there should be cheap (maybe even free), readily available, and numerous public transportation options. Convert parking lots into usable land, and install large parking garages on the outskirts of the cities, again cheap or free, and make them hubs for the public transportation options.
Now, people can drive to the city on their own. We don't have to immediately redo the entire country's infrastructure so that rural citizens still have mobility. If you're just passing through the city, or want to keep your car on you, there could be a day pass option. It'd be expensive, but doable. Otherwise, you can park and do whatever you need to, and just return to your car when done.
As far as city dwellers who may want to own a car for trips, allow rental of a space in a parking garage for a reasonable rate. You can store your car there indefinitely, have free access to it, but would still need a day pass to operate inside the city.
Change is slow. We have to accept some half measures in service of getting things more in line with where we want them. Eventually we may be able to phase out cars completely, but I'd personally be fine with a drastic reduction in cars inside cities. Incentivizing alternatives works better than punishing the unwanted behavior, and works even better when the two are used in tandem.