Methane is often encountered over oil deposits. Another good question is, “Where does the methane on lifeless planets come from?”
Methane has also been said to have come from dinosaur excretions before the goalpost of rotting plants was added. In academic hoodoo speech, that’s “metabolizing plant matter” or some similar vaguery.
Look at it this way Light fro the sun hits the earth.
Plants use Photosynthesis to convert the sunlight into plant matter, leaves and wood. The leaves fall into a swamp where over thousands of years they build up, then get covered by some Cataclysm. The eaves then break sown into coal.
So when you burn the coal you are actually using fossilized sunlight.
OUCH! Twisted my arm patting myself on the back for that one!
Aanaerobic decomposition. Just like anearobic digestion of cow shit or garbage in a landfill.