There are some companies whose strong brand recognition and consumer loyalty allow you to invest in their stocks with minimal hesitation that it will pay off over the long term. Recent macroeconomic headwinds and market challenges have made it crucial to invest in secure growth stocks like this, with Apple (AAPL 0.10%) and Disney (DIS -0.77%) two great options.

These companies are dominating their respective industries with substantial market shares. Apple has spent years at the top of consumer electronics, while Disney is celebrating its 100th year of entertaining the masses in 2023. These companies operate in two never-ending markets, producing commodities that are unlikely to slow in demand anytime soon.

So, here are two stocks to hold for the next 20 years. 

1. Apple 

This tech behemoth has achieved the largest market cap in the world at $2.7 trillion thanks to its focus on quality products presented in an interconnected ecosystem. Apple's strategy makes it difficult to use competing products that don't offer the same ease of use and connectivity, which has built immense brand loyalty among consumers.

Investor tycoon Warren Buffett said in early April, "If someone offered you $10,000 to never buy an iPhone again, you wouldn't take it." And Buffett's sentiments ring true for many consumers who would have no problem switching brands of vehicles or other appliances but are reluctant to stray from Apple. That level of consumer allegiance is rare and reduces volatility in the company's business and stock.

Moreover, Apple's dominance in consumer tech led it to attract many customers to its swiftly expanding services business. The iPhone manufacturer's library of services includes Apple TV+, Music, iCloud, Arcade, News+, and more. These platforms offer attractive profit margins, hitting 72% in fiscal 2022, while products' profit margins reached 36%. The digital business fortifies Apple's earnings by allowing it to lean less on its product income amid temporary headwinds. 

Apple shares soared about 315% in the last five years and over 1,000% in the last decade.  The company has a reputation for consistent gains, which makes it a great option to hold over several decades.

2. The Walt Disney Company

Disney has had a challenging few years, to say the least, with the COVID-19 pandemic shuttering its box office and parks businesses for nearly two years. Then, macroeconomic hurdles last year made it costly to develop its streaming business. As a result, the company's shares plunged 44% last year. Disney has partially recovered in 2023, but recent headwinds have been detrimental to its long-term growth, with its stock barely up 1% over the last five years. 

However, unavoidable challenges in recent years are unlikely to repeat, making its stock a bargain buy right now. In February, Disney CEO Bob Iger laid out a plan to get the company back on track, targeting $5.5 billion in cost savings, with the majority coming from reductions in content spending. Meanwhile, the company expects to cut about 7,000 jobs by summer, including 15% of its entertainment division. The cuts will likely pay off substantially as Disney strives to achieve profitability with its streaming service, Disney+, by 2024.

Disney shares climbed about 61% over the last decade despite recent hurdles.  The company is a king of entertainment, with its monster brand increasing the reliability of its stock.

Additionally, its price/earnings-to-growth ratio of 0.9 suggests that projected growth is not currently priced into its shares. With multiple blockbusters due to premiere this year, budget cuts, and a thriving parks business, that figure aligns with the company's potential. As a result, now is an excellent time to buy Disney stock and enjoy the gains over the next 20 years and beyond.