It’s relatively trivial (but more expensive than getting it straight from the ground) to synthesize oil from atmospheric components + energy. Some countries have done it at large scales during wartime.
The trick is leveraging insanely cheap solar electricity to do everything else.
If you're thinking of Germany during WWII, or South Africa during apartheid, they produced synthetic liquid fuels from coal. That was technology that worked, though it was very expensive. And of course CO2 emissions were much higher than using petroleum.
The only really feasible way to produce that much electricity renewably by this point in time or even within the next 20+ years has been nuclear energy, which the world largely turned their backs on the last few decades and left us in an even bigger hole to fill.