Not true, just a myth repeated over and over.
Quote: “The day before the announcement Apple had a market cap of $2.46 billion, and had ended its previous quarter with quarterly revenues of US$1.7 billion and cash reserves of US$1.2 billion, making the US$150 million amount of the investment largely symbolic. Apple CFO Fred Anderson stated that Apple would use the additional funds to invest in its core markets of education and creative content.“
source:
https://en.wikipedia.org/wiki/History_of_Apple_Inc.#Microsoft_deal
„Microsoft's $150 stock investment was the result of a settlement of a lawsuit. In fact, the investment was just an initial payment for other "substantial balancing payments" that would be spread out over then next few years, then Apple CFO Fred Anderson said at the time.“
Source:
https://www.zdnet.com/article/stop-the-lies-the-day-that-microsoft-saved-apple/