Hello and Welcome to the forum!
Fungus spores are everywhere, and when conditions are just right they will sprout and grow. Some seem to especially like potting soil, moisture and warmer weather.
So, the mushrooms are growing on the compost, not the plant. They won't harm the plant. They won't last very long. You can remove them if they bother you, but it doesn't cause any damage to leave them.
I like to see them, just a little reminder that we're not really the ones in charge of EVERYTHING!