Matter flows in a cycle, with the amount of matter on the Earth not changing since the very beginning of its formation. When organisms (Producers (trees, plants, etc.) and Consumers (Animals, insects, etc.) die, the Decomposers (mushrooms, etc.) consume them and cause them to decompose. This is then formed into abiotic chemicals such as carbon dioxide, nitrogen, and oxygen, which are turned into energy by producers and eaten by consumers. Think kind of like the transfer of energy but instead, it’s a cycle and it’s about the matter and there are barely any similarities but you can try.