For this, I will start way early on, long before the Mushroom Kingdom was formed.
Long ago, there was a magical human country constantly under the threat of collapse from territorial disputes from various dragon tribes across the land. These humans lived in a country where the royals possessed immense holy magical powers.
For many years, the too proud dragon tribes refused to join up against the humans, while the humans' magical defenses continued to keep them at bay since the time of their settlement. A constant stalemate... until an individual was born that tipped the scales.
Though the dragon tribes were too proud to team up with one another, there was a tribe of 'lesser' dragons of which all dragons subjugated as their slaves. A race of 'turtle-dragons' whom were known as the Koopa.
The dragons treated the Koopa as slaves for as long as their kind could remember. The Koopa specialized in using industrial level creative creations to upgrade the dragons, both with armor, cannons, and the like. And not only that, the powerful dragons often used their powerful but chaotic magics to fuel their dragon powers... and they often were willing to sacrifice the lives of their Koopa slaves, due to their rapid reproduction cycles, as sacrificial channels for that magic, often using them as sacrificial kamikaze projectiles or magic shields.
This servitude encompassed the Koopa way of life. Till one day, a rather... unusually prideful Koopa became born. To be precise, Bowser's unnamed father.
Bowser's father, for now, shall just be known as Powser(pa bowser) till a better name is figured out.
One day, the rather prideful koopa mechanic Powser was working for the dragons, annoyed with having to obey the ol' blowhards as usual, when he had the 'fortune' of being on the front lines against the humans as punishment for his uppity mouth. Many thought he was lucky to come out of it alive, since another dragon tribe also attacked both the humans and their forces at the same time. But during that fight, he learned many things that changed his viewpoints on the world.
First off, due to the other rival tribe, Powser learned that it wasn't just his Koopas that were suffering the rule of the dragons, but others as well had to serve different types of dragon tribes out there.
The second thing Powser noticed was the unique and powerful ways the enemies wielded magic as compared to the more chaotic wasteful methods the prideful dragons used. It was awe-inspiring, making him realize there truly were beings able to stand up to their cruel overlords.
With these in mind, he realized that his 'mighty masters' weren't as all powerful as they made themselves out to be. They're just as mortal as any of the rest of them. The superstitious stories they told their kind were utter nonsense meant to prevent them from realizing they were just mere mortals. They can die... and the Koopa don't HAVE to listen to them.
Of course, though they don't HAVE to listen to them, Powser knows he wouldn't survive turning against them on his own. He's not stupid. His best chance is to increase his powers. Koopa, even with their technical excellence, always had a talent for absorbing and casting magic to enhance their overlords' abilities. But, it's so reckless how they do it that doing so themselves is potentially be suicidal. They need something less likely to explode in their faces. They need the magic of the humans. But how?
He'd need to get into contact with them somehow. But, with how well known he is as a mechanic, there's no way he could escape without being noticed. He'll need another way to contact them. A messenger of some sort that the dragons will overlook.
At that, he suddenly remembers something. A while back, he saved a rather unusual creature that was always hiding in the shadows. He was curious about it and set a trap, only to befriend it. It was a strange sub-species of dragon. Flatter face, human like hands.... and strangely, lacking scales, having lots of ugly boils scattered asymmetrically across its skin. In other words, something very hideous. But, were it not for his trap, he would have never spotted it due to its stealthy movements.
After he had trapped it, he strangely befriended the entity and set it free.
Now, since he set it free, perhaps it can help him gain his own freedom. Such stealth should allow it to get in and out of the territory with ease.
Eventually, Powser finds him, but his friend is refraining from helping. He's scared of what others would think about his grotesque appearance. Powser agrees. With a look like that, the humans would likely attack first, and ask questions later. But then, he comes up with an idea.
The next day, he brings to the creature a new outfit to hide himself in. After putting it on, Powser says: "Say hello to the new you. I call it... 'Shy Guy'!" I doubt I need say that his friend and his species quickly joined the fad after that, since it let them speak to others without worrying about their appearance.
After granting his new Shy Guy friend this disguise, he readily accepts the mission from Powser to contact the humans for help.
After contacting them, the humans are reluctant to accept at first till Powser can give something in return. Considering the humans specialize in magic and the koopa in tech, it's an easy deal to make for him. Tech from him and the allies he can gain in return for magic training and aid against his Overlords.
After beginning his training, Powser slowly tries to gain further allies among his kind, till eventually, the day comes to overthrow the overlords, the dragons ruling that section of the kingdom in a united assault, the Koopa and Humans working together.
From there, it quickly became a war against the dragons, along with a long campaign of uniting the enslaved Koopa to Powsers rule.
Along the way, Powser becomes great friends with the current prince of the kingdom, enough to fight alongside him many a time. Enough to... see a rather recurring event come to pass. That being a novice sorceress constantly pestering him about them being destined to be together. That she'll never let anything come between them.
Later, even on his death bed, Powser can never forgive himself for passing her off as harmless back then.
This novice sorceress was obsessed with the prince. And after one failure, trying to figure out how to MAKE him hers, she happens upon an unusual source of inspiration.
As luck would have it, she found such.
She was looking through a magically enhanced telescope among the stars when she found an unusual war going on in space.... the Shroobs taking over their home planet. More precisely, she saw them converting their fallen foes into more loyal Shroobs to join their ranks. A parasitic sapient mushroom.
With that in mind, she started to study mushrooms and how to combine them with her magic, experimenting to extremes in her obsession to have the prince, as well as have her revenge upon Powser for his meddling.
Once she became good enough to combine her magics with mushrooms, she tried to experiment with a method to make a permanent end to the dragons by infesting and changing them from the inside.
She somewhat succeeded, inadvertently creating the Yoshis. However, by the time she finished that tribe of dragons, she left their island only to discover the remaining dragon tribes had already been decimated through the combined teamwork of the humans and koopas, whose alliance she had underestimated.
Frustrated, during the peace, she tried to convince him by showing her new might... only to have him be horrified and sending soldiers to apprehend the terrible witch for her evil magics.
Unfortunately, losing her hope of doing so nicely from this causes her to decide to force her goals, and gain his love, whether he likes it or not.
With that in mind, she tries to infest humans with her mushrooms when the nice approach fails to allow her near enough to even speak to the source of her obsession. Unfortunately, doing so had unexpected consequences, mixing with their magical potential and turning them into monsters. But surprisingly, this very instability also made their forms, and minds, easier for her to shift to her will.
With this done, she tries to get some more... test samples... while trying to keep unnoticed. She then experiments upon her kidnapped victims. Eventually, she learns to control them, turning them into shapeshifting human/mushroom hybrid monsters, while also disguising them as an unassumingly cute form. A form that she calls a Toad.
She starts using them in small groups to try and take over cities, but as dangerous as they are, they just aren't strong enough to do well against the trained magic soldiers, or even occasional well equipped Koopa, that show up. So, she backs off her attacks and tries to rethink her strategies.
As she goes over her notes, she realizes one of the reasons why mushrooms are so hard to get rid of is their high rate of reproduction. Her lone Mushroom monsters can reproduce a ton, though they lack the magical fortitude of her hybrids.
As for her hybrids though, they're more human than mushroom. They can't reproduce as fast as long as they remain too human. They need to be converted further. It's not long till she creates her first elite forces, by putting her experiments into coccoons to convert them more fully into a mushroom organism that maintains its humanoid characteristics and magical potential powers. Only now... they can fairly rapidly reproduce, even while battle. They even have more advanced capacity for shapeshifting, allowing them to shrink, grow, and more even more easily than her original mushroom creations, thanks to their magical potential empowering their abilities ever further.
The fact that they have magical powers on top of that makes them extremely deadly.
With these forces under her control, she starts to create a very formidable force, wiping out more and more of the human soldiers that try to stop her. It gets to the point where the humans start calling in the aid of the Koopas, which pushes her into a stalemate position. Worse even, since her forces are being forced back, and eventually, back into hiding.
Frustrated and realizing that she has to consider their allies and potential allies as well, she decides to pull back and see if there are ways to further push her Toads. They originate in Mushrooms, and thus, she decides to start by re-researching it fully till she can come up with a plan.
After some time, she comes up with a two-fold plan.
First, she creates a test location for her greatest creation. An underground mushroom network, much like how normal mushrooms are hard to kill due to their underground network of connections... but she takes it a step forward. By implementing her mushroom control of giant mushroom creatures with the very land as its nutrients, she starts to take control of the land of the kingdom itself, turning it into a... Mushroom Kingdom, or at least the starting of it.
With the land itself becoming a slow, powerful force for her to control that spreads through the land itself, it doesn't take long for even her creative enemies to become overwhelmed.
Meanwhile, while her landshrooms slowly spread, she sends out her Elite Toads, disguised as harmless merchants, out to other lands outside the boundaries of the Kingdom to form 'good relations' outside of it, while also spreading slander about the evil of the humans of the Mushroom Kingdom, along with their turtle dragon allies, the Koopas. But at the same time, stating that their tyranny will soon fall thanks to their mushroom queen, and the 'merchants' are merely 'bartering for added supplies' to make finishing the war against their weakening former tyrants easier.
By painting the humans and Koopas of the land as the villains in every country outside of their land, she ensures that they don't gain allies due to them being labeled as evil.
Though it takes time, this Mushroom Queen's plans work. No one comes to their aid, and though there's difficulties, the Landshrooms eventually separate and convert all the humans in the land to their own kind. Even the mightiest of them all, the land's prince turned king(due to his father's death) gets captured by them, though his mighty holy magics make it very difficult.
It takes a mushroom trap of sorts to deal with the king, the trap regenerating faster than his immense magical powers can destroy it. On its own, the mushroom trap's attacks are negligible to the mighty king. But, it doesn't have to be stronger than him. It just needs to outlast him, and outlast him it does, till he finally exhausts himself to a vulnerable enough state to break his mind and take him over as her mightiest slave.
Despite being braindead, that's fine to the now insane queen. She wanted him for his looks and the potential power and perfectness he seemed to be. Perfect for making her children all the more powerful and wonderful, and she was obsessed enough with her being the perfect mate for her that she went to any and all lengths to do so. With him, her ascendance to being a 'Queen' is not only guaranteed, but it also guarantees all the best for her future children by combining her bloodline with a mighty bloodline like his, altered though it is from the mushroom possession. But, she thinks that's all the better, since it should strengthen the link her children would have with the mushrooms she used to take over the kingdom.
Meanwhile, the Koopas aren't doing much better than the humans. They've been scattered, forced to use underground brick stone caverns to protect themselves from the ever watchful landshrooms and their mushroom networks.
Despite the overwhelming disadvantage, the Koopa continue to fight the Toads, as best as they can manage. But in the end, it's not long till the queen's Landshrooms have infested all but the most volcanic of terrains.
And worse for Powser... in the conflict against her toads, he lost his wife, shortly after she gave birth.
And after that, just to rub salt in the wounds, he gets message that all his calls for aid outside the kingdom were refused, due to them having heard of all the 'evil' things the koopas and their allies have done, not wanting any part of them.
This finally is the breaking point for Powser. He thinks: "So, I'm the bad guy, am I? The big evil in the kingdom? ...Fine then. They want to label me as the villain? Then, I'll start acting the part! No more Mr. Nice Koopa!"
And I'll type up more another day.