Fungi play a crucial role in nutrient cycling by decomposing organic matter, such as dead plants and animals, into simpler compounds. This decomposition process releases nutrients like carbon, nitrogen, and phosphorus back into the soil, making them available for uptake by plants and other organisms. Fungi also form symbiotic relationships with plants, such as mycorrhizae, which help plants absorb nutrients more efficiently from the soil. Overall, fungi contribute to the recycling of nutrients in ecosystems, promoting soil fertility and supporting the growth of plants.