Mushrooms naturally occur in areas with a brightness of less than 12 (most commonly found in caves), and have a 1?8 chance of generating red mushrooms and a 1?4 chance of generating brown mushrooms in each block when conditions are met. Mushrooms are found in swamps, giant coniferous forests, the Mushroom Island biome, and the Lower World. Red Mushrooms spawn in flower pots in the Witch's Hut. Mushrooms also spawn in the Mushroom Farm Room in the Woodland Mansion. In Bedrock, fallen oak, spruce, birch, and jungle trees will spawn 0-2 mushrooms above the logs.
I hope this helps. Please point out any errors!