Certified GKH Gardening Expert
They are not a hazard unless they eat the mushrooms. Naturally occurring fungi are present in the soil, on plants, and throughout the environment. Certain types of fungal spores become airborne and may cause allergic symptoms. This occurs whether or not you have mushrooms in your lawn. You can reduce the number of mushrooms/toadstools in your yard by decreasing moisture and/or shade. They actually are beneficial to your lawn and are helping break down organic materials. Here is more:
https://ag.umass.edu/landscape/fact-sheets/fungi-in-mulches-composts
http://pollen.utulsa.edu/Spores/fungi.htm
https://www.gardeningknowhow.com/lawn-care/lgen/eliminate-mushrooms-in-your-lawn.htm