From its inception through the end of 2022, The Bill & Melinda Gates Foundation Trust had made total grant payments of about $71.4 billion. One of the reasons the trust has been able to make such generous donations is because of the successful investments that make up The Bill & Melinda Gates Foundation Trust's portfolio, which is valued at about $42 billion.

Main Street investors can take a cue from the trust and find investment ideas that would benefit their own portfolios. Below, two Motley Fool contributors explain why they believe that among the trust's holdings, Microsoft (MSFT 1.82%) and United Parcel Service (UPS 0.14%) are particularly compelling at the moment.

Microsoft shows no signs of slowing down

Scott Levine (Microsoft): The bedrock of the Gates Foundation is Microsoft, its largest holding by far. As of the most recent 13F filing, Microsoft represented 34% of the trust's holdings. The next largest position, Berkshire Hathaway, has about a 17% weighting in the trust.

Microsoft's forward dividend yield of 0.74% might not rev the engines of those who are looking to generate strong passive income, but the Gates Foundation Trust has 38,210,869 shares of Microsoft, which will provide more than $28.6 million from dividends this quarter.

Rather than considering the stock as an income play, most investors will find it a worthy growth opportunity. It might seem hard at first to characterize a stock with a $3 trillion market capitalization as a growth stock, but Microsoft's strong position in artificial intelligence (AI) supports the argument.

For one, it is a major investor in OpenAI, the developer of ChatGPT. Currently, OpenAI isn't a publicly traded company, so those eager to invest in ChatGPT have few options, though picking up shares of Microsoft provides indirect exposure.

But Microsoft has its own AI offerings that will contribute to the company's growth in the coming years. Addressing the important role that AI will play in his company's future, CEO Satya Nadella said during the 2024 second-quarter call that the company has "moved from talking about AI to applying AI at scale," adding, "By infusing AI across every layer of our tech stack, we're winning new customers and helping drive new benefits and productivity gains across every sector."

Copilot is Microsoft's AI assistant that is available to both individuals and businesses. Companies can design their own Copilots to provide AI assistance catered to the businesses' needs.

The German conglomerate Siemens, for example, collaborated with Microsoft to develop Siemens Industrial Copilot, an AI-assistant that manufacturers and various other industrial companies can use to boost productivity.

With the AI market expected to grow at 15.8% compound annual growth rate (CAGR), from $306 billion in 2024 to $739 billion in 2030, Microsoft is well positioned to benefit from the market's growth.

UPS is set for a recovery in 2024

Lee Samaha (UPS): Based on its last 13F filing, the Gates Foundation Trust holds only 24 stocks, and the top 10 stocks are responsible for more than 96% of its total holdings. That said, there are various themes you can discern from the holdings. One of them is that Microsoft and Berkshire Hathaway effectively contribute to the trust's total exposure to information technology and financials, together contributing to a little more than 50% of the total portfolio value.

After that, there's a heavy weighting to a collection of industrials and transportation stocks, including UPS. These two sectors make up nearly 42% of the Trust.

There's an apparent comfort in holding stocks that rely on the economy, and that's certainly the case with UPS.

The company suffered a difficult 2023 with slowing economic growth affecting its delivery volumes and a protracted labor dispute, causing customers to divert deliveries to rival networks. In addition, the costs associated with resolving the labor dispute pressured its profit margins.

The bad news is out of the way, and UPS will likely have a better year. It will lap the cost increase in 2024, cutting 12,000 jobs in response to weaker demand -- a move that will reduce costs by $1 billion in time.

UPS also has a growth opportunity from winning back lost customers. Moreover, the possibility of lower interest rates later in the year will be good for its volume.

In the meantime, UPS continues to grow in its targeted end markets, such as small and medium-size businesses and healthcare, and management continues to invest in productivity-enhancing technology like automation and smart facilities.

It all points to a recovery in UPS, and it doesn't hurt to earn a 4.4% dividend yield while you wait for the stock to appreciate.

Should you buy these Bill & Melinda Gates Foundation stocks now?

Smart investors consult a variety of sources for inspiration -- such as the stocks found in The Bill & Melinda Gates Foundation Trust. For investors looking to gain AI exposure, Microsoft, the trust's top holding, is a great opportunity right now. For those seeking the reliability of an industrials leader that provides prodigious passive income, UPS stock is a great opportunity.