My experience at the time says to me that Microsoft succeeded in two areas with MS-DOS and Windows where IBM failed with OS2.
Those two areas were marketing - Microsoft was a jaugernaught, where IBm remained staid, and engagement with and open to developrers outside of Microsoft, where IBM was an unfriendly heavy hand. I think OS2 was a technologically superior caddilac (a blind friend who was very tech savy once explained to me, from his perspective, the superiority of OS2, which gave him abilities neither MS-DOS or Windows was deliveruing) trying to keep everything caddilac while MS-DOS and Windows were Fords that developers rushed to improve and add to. I think IBM did that because at the first wave of the PC world IBM did not internally have faith in it, even as they tried to respond to it.
In the 1980s/90s I had a friend whose brother worked for IBM. He told me that IBM viewed its core business as building and servicing mainframes; it considered home PCs as a small niche market. After all, how many ordinary consumers would even want a computer?