The way to understand the origin of fossil fuel deposits is that hundreds of millions of years ago trees were made of plastic. Thats not quite literally true but it gives the right sense. In the Carboniferous period trees grew abundently but there were not yet bacteria that could break down the lignins composing the woody structure. Its very similar to what you'd get with plastic trees today: they would fall and pile…
https://en.wikipedia.org/wiki/Abiogenic_petroleum_origin
To me it makes sense that some or all hydrocarbons are or at least started like the hydrocarbons found on other planets in our solar system.