And it doesn't have to be a legal ban: just bring in the cost of externalities. You can drive an Old School Hummer all you want: just be willing to pay for the pollution you are causing.
You can drive the New School EV Hummer all you want: just be willing to pay for the road damage you are causing.
I think everyone knows the deadlines that are set for phasing out fossil fuel vehicles are not going to actually be enforced. They are nothing but virtue signalling from politicians.
If those things are actually enforced, you can expect a blowback that will make the election of Trump look like a minor detail compared to the insane populists that an angry population will put in power.
Manufacturers are planning to phase out fuel-powered cars (perhaps completely, but at least in some countries/regions), so governments may not have to do much enforcement themselves:
Even in Silicon Valley it seems like half the vehicles I see are trucks.