Oil and gas were just microscopic fishes, trees, or maybe they were dinosaurs' fossils that lived many years ago,
They were absorbing their energy from the sun.