Its an optimization problem, the embodied energy of the new car vs how much you save driving it, as it's more fuel efficent than the old one. But in most cases you would need to drive the new car for decades before you break even.
It’s much less than decades. Unless you only drive once a week to the corner store.
It really depends on the grid emissions. If you’re charging your EV in Vermont (mostly hydro grid) vs West Virginia (mostly coal fuel), it can be orders of magnitude different.