Well... isn't that pretty much true?
Coal-in it's various forms, oil-in it's various forms, come from biomass. Although that may not be the only 'source' for coal/oil.
Diamonds were supposed to be formed by tremendous heat and pressure deep within the Earth. Now we think it may have been produced by meteorite impacts. After all, many diamonds were found on the surface. Maybe they were formed also, by both.
Many things that we 'were' taught , we now know are not true. Many things we know 'now', are not true either.
At least when we were young, teachers TRIED to tell us the 'accepted' truth. Nowadays, it seems most 'teachers' are only concerned with paychecks and politics.
biomass is correct. It also depends upon how deep that biomass is. If it is relatively shallow (1-2) miles (?) it forms into coal. When it goes down to the interface with the molten core of the earth it becomes oil.
At least that is how I understand it.
(But I could be wrong.} I don’t think there is a scientist anywhere on earth that “KNOWS” exactly the constraints and the physics of this matter of energy conversion.
When I was in the sixth grade, my teacher was giving us a lesson on how coal is formed from dead plants and animals. Now it happened that my grandfather had a coal pile from wehich he lugged chunks to the fireplace in his house. I had seen patterns of ferns and such when busting the bigger chunks into ones small enough for him to carry in his bucket, so I carried a nice fern pattern to school and raised my hand when science class began. My question to the teacher was, “If the decayed plants and animals madke the coal, why is there a nicely preserved fern in this lump of coal?” I got in trouble for asking because the teacher (happened to be a cousin on my grandfather’s side) had no idea how to answer that one. I of course, being the smarty pants I was, had already decided that the coal had been oil before it solidified into coal, so when it was oil the plant fell intot eh ‘tar’ and got preserved until the tar went solid. At 67 this summer, I’m still convinced that’s the answer.