Hydrocarbons are part of the universe. There is a moon of Saturn called Titan. It has oceans of hydrocarbons. It rains hydrocarbons. In some ways it is a celestial gas station for some future descendants of Elon Musk to fill up and travel further.
I doubt the Titan hydrocarbons come from dinosaurs, ancient savannas, algae or plankton.
Also, Musk chose methane as one of the fuels because there is a lot of methane on Mars. One of the current, large rovers on Mars has a proof-of-concept experiment called MOXIE. MOXIE proved we can make oxygen out of the Martian atmosphere.
Chickens come from the store. What’s there to know?
Mars has 93% CO2 in its atmosphere. Plant some trees and voila you get O2.