No, most coal comes from plants in swamps, because the water helped preserve the organic matter.
Plants in swamps die -> organic matter on the bottom of the swamp -> peat -> brown coal -> black coal.
Oil apparently comes mostly from plankton.
On the different origins: https://www.carboeurope.org/how-are-fossil-fuels-formed-the-science-behind-oil-coal-and-natural-gas/