Microsoft is the definition of an ossified monopoly which has no idea how to react in a competitive market
The original Windows Mobile was arguably the first true smartphone OS. It was total shit, crashed all the time, and the Internet Explorer of that era could barely load a website without also crashing. But it was a real OS that had a small but growing ecosystem of apps and it filled a niche at the time. I had one of those early Windows Mobile 5 era devices because people ran their medical database apps on that platform back then
But as usual someone showed up and disrupted everything. And as usual it was Steve Jobs and Apple with the iPhone. The iPhone literally changed the world. Everyone from the "Before iPhone" era was slow to react, not just MS. All the BiP era companies are gone now. Nokia, BlackBerry, Palm, etc. It's true that MS fucked up responding to iPhone but so did everyone else
Only Google, which at the time had not even reached a beta stage with Android, immediately threw what they made into the trash and started over when iPhone was announced. They saw what Steve Jobs had made and instead of (infamously) laughing at it like Steve Ballmer did, they instantly understood it was the future and turned the entire Android project around to imitate it
By the time MS finally reacted and released Windows Phone it was mant years too late. It was also uninspired, had zero app support, and people just straight up don't like Windows very much. So a typical MS "catch up" product which failed to catch up in a meaningful way after the market had already chosen the winners
The rest is history
Edit: My first "After iPhone" smartphone was the Motorola Droid X (2010)