There are a lot of companies that have billions in cash and are also prodigious buyers of RAM. Companies like Apple, Google, Meta, Nvidia...
Do they want to get into a commodity business like RAM production? Maybe not, but if prices stay high long enough that demand for their products falls off, they might think about it.
I know that I personally and my employer are cutting way back on new technology purchases and squeezing as much as we can out of old equipment due to the cost of RAM and storage now.
>a lot of companies that have billions in cash
They sit on billions because they avoid spending their money as much as possible.
The amount they spend on RAM in surrounding few years would represent almost nothing to the massive money hole that would happen if they tried to make their own fab.
Also, these problems tend to affect the entire market, which means if you're big, you're fine. It's when problems don't affect your competitors but affect you that the real issues for these companies crop up.
And none of these companies are operating their own fabs, that's the problem.
Fabs are a cutthroat business that's very hard to get into. It costs billions of continual investment to stay a float. That's why there's really only about 3 different companies with cutting edge fabs. TSMC, Micron, and Samsung. Even intel, who built a huge portion of their business on cutting edge fab tech, has struggled to keep funding it. AMD got out of the fab business almost a decade ago (spinning off global foundries) and that spin off is no longer cutting edge. AMD uses TSMC.
Fabs are some of the most expensive factories to operate on this planet due to a constant need for brand new equipment and cutting edge research. That's why there's not an Apple, Google, Meta, or Nvidia fab. That's why there's not an AMD fab. That's why Intel fabs are treading water.
Without the constant investment, you very quickly find yourself in the company of yet another cutthroat industry, the "not cutting edge" fabrication industry. And that, by and large, has already been locked up by about a dozen fab companies.