Microsoft didn't have a monopoly on PC operating systems. They did get gifted a huge market share by IBM making not one, but two bonehead moves, first giving MS the license to DOS and then dawdling on OS/2 long enough for Bill Gates to lose patience and ship Windows 3. But MS never had a monopoly. Apple shipped PCs with their own OS. IBM had their own version of DOS and shipped PCs with it. There were even still CP/M machines around for a while. And there was Atari and Commodore, each of which shipped their own PCs with their own OSes. Then Unix variants began to be available for PCs.
Standard Oil wasn't a monopoly either. There were other oil companies in the business. But Standard Oil was selling oil, at a profit, at lower prices and in greater quantities than any of its competitors. The competitors didn't like that and got the government to break up Standard Oil under antitrust law. Which, as I've said, made things worse for customers.
In other words, if the competition simply doesn't compete very well, or makes bonehead decisions, a company can get a large market share, yes. But "large market share" is not the same as "monopoly".
If you want a better example of government created monopoly, look at ISPs in many areas of the US, where for many years state and local governments gave one company exclusive rights to sell Internet access in particular areas. With the expected result that Internet access sucked as compared to areas where there was competition. Much of that has gone away now, and Internet access as a result is much improved in those areas.