The problem is the fossil fuel that is concentrated carbon from millions of years of plants and now just adds to the CO2 in the atmosphere without a corresponding mechanism to take it out again.
If we create gasoline by capturing CO2 from the atmosphere there isn't a CO2 problem with using it for fuel. Processes exist, but all have some (major) inefficiency issues.
Edit/Note: I’m in the US and typically seek out data for the North American region. Maybe palm oil biodiesel is a bigger thing in other parts of the world (Africa, Europe, Asia?) - not sure. Would be intrigued if there is data supporting it either way. The US dataset below has “no data” explicitly stated for palm oils.
[1]: https://www.eia.gov/biofuels/biodiesel/production/table3.pdf
This page [1] says biodiesel emits 2,661 grams of carbon dioxide per gallon. Let’s say a 1988 F250 gets 15 mpg => 2,661 g/gal * 1/15 gal/mile = 177.4 gram CO2/mile.
Pretty cool it’s less than both the Chevy Malibu and Hummer but wonder how it compares to other petrol cars - it is just proportional to fuel economy but im not gonna run the numbers. In my head a pure gasser car would need to get above about 40mpg of petroleum fuel to emit less grams of CO2 than a 15mpg vehicle running pure biodiesel.
TLDR biodiesel is what’s up if you can’t afford an ev (and still has its place if you can). Pure petroleum diesel still barely emits more co2 than gasoline anyway [2]
Disclaimer: only comparing carbon dioxide and not other greenhouse gas emissions
Edit: i'm seeing some numbers around that the average human exhalation per day is emits 1 kg of CO2, for reference. [3]
[1]: https://impactful.ninja/the-carbon-footprint-of-biodiesel/
[2]: https://theicct.org/sites/default/files/Gas%20_v%20_Diesel_%...
[3]: https://www.sciencefocus.com/planet-earth/how-much-does-huma...