Primary producers are also referred to as autotrophs. They are organisms that use sunlight and some materials that are gotten from nonliving sources to obtain their energy. They have the ability to manufacture their foods by themselves. These living organisms are usually green plants.
Hence, phytoplankton, grasses, algae, and trees are primary producers, but fungus is not a primary producer. Instead, the fungus is recognized as a decomposer. We can also find some organisms that are primary producers in running water, such as protists, higher plants, algae, and some bacteria.
This chain goes as thus: the consumers depend on the autotrophs for their feeding, and in the end, decomposers eat up the dead plants and animals. Fungi is a typical decomposer and not a producer. The food chain starts with the producer, and it ends with the decomposers, to which fungi belong. Fungi are reckoned to be the main decomposers of nature.