Be a rich country, have a 25% tax on cars, discount that to 0% for the first ~$50,000 of EVs, be small so electric infrastructure is easy. Have good public transit so if you’re poor you don’t need a car.
But Norway does have the benefit that it has relied on electricity for much of its heating for a long time. So the added load of EVs is not huge relatively speaking.
Though the surprising thing is just how easy it has been. There’s no reason to think it’d be insurmountable for other countries. We have the same rules of physics here.