Dear Student
Cosmopolitan means having a wide range of occurrence, something present at almost everywhere.
Fungi are present in water, soil, air and even inside and on surface of certain plants and animals. Hence they are called to be cosmopolitan.
Regards