Long-term investing is the key to sustainable returns in the stock market. Perhaps no one knows this better than famed investor Warren Buffett, whose holding company Berkshire Hathaway has returned 20% annually since he took over the company in 1965.

Let's take a closer look at why General Motors (GM -0.05%) and RH (RH 0.64%) present as two top stock picks in Buffett's legendary portfolio and might just be worthy of buying and holding forever. 

Person watching their stock portfolio.

Image source: Getty Images.

1. General Motors 

Warren Buffett's investment strategy relies on value and a deep economic moat (a sustainable competitive advantage over rivals in a specific industry). And General Motors has both qualities. The company can use its vast scale to compete with newer rivals in the electric vehicle (EV) market. And its low valuation is icing on the cake for investors. 

GM's CEO Mary Barra said she believes her company can outsell Tesla (the current EV market leader) in EV sales by 2025. And that's an ambitious goal because Tesla currently outsells GM by 14x (with 350,000 units sold in 2021) when it comes to electric vehicle sales.

However, GM's existing gasoline-powered vehicle business could give its EV business an exciting edge. The company boasts strong brands such as Chevy, Buick, GMC, and Cadillac, where it could roll out electric models with prebuilt brand loyalty along with established dealership and repair networks.

It is unclear what impact EVs will have on GM's top and bottom lines because these products could cannibalize gasoline vehicle sales. But by 2030, GM expects to double its revenue (to $280 billion) by unlocking synergistic opportunities like autonomous driving and mobility software. The company also expects to boost margins in the EV business through scale and improvements to its battery technology. 

With a forward price-to-earnings multiple of just 5.4, investors seem to be overlooking GM's long-term potential -- especially compared to Tesla, which trades for 37 times projected earnings. The company is a great way to bet on the exciting new industry at a reasonable price. 

2. RH (formerly Restoration Hardware) 

Like General Motors, RH is another Warren Buffett stock with a deep economic moat. However, instead of focusing on scale and volume, the upscale furniture shop differentiates itself through quality and brand cachet. And while the business faces pressure from macroeconomic challenges, it looks poised for long-term success because of these advantages. 

According to RH's CEO Gary Friedman, anyone who doesn't think the U.S. is in a recession is "crazy." And while some economists disagree, most see the macroeconomic challenges. At 8.2%, the inflation rate remains elevated, and Federal Reserve interest rate hikes threaten to slow economic growth by increasing the cost of capital. That said, RH's focus on luxury products helps shield it from these headwinds.

According to experts who spoke to CNBC, sales of luxury products tend to hold up better against recessions because their primary consumers are cushioned from economic shocks because of their wealth. RH is setting its brand apart through opulent showrooms (that feature bars and guesthouses) and an ambitious international expansion into Europe, which will include the opening of RH England in spring 2023. 

RH has a P/E multiple of just 11, which is significantly lower than the S&P 500's average of 18. And while the low valuation is in response to real macroeconomic challenges, the company's luxury focus should help it weather the storm and position itself for long-term success. 

Keep a long-term perspective

So far, 2022 has been a brutal bear market for stocks. And these challenging times highlight the importance of long-term investing. Instead of getting distracted by short-term (and likely temporary) volatility, investors should focus on companies that can create value for decades into the future. General Motors and RH fit the bill, and it's easy to see why Warren Buffett is betting on these stocks.