As the world's most valuable company with a market cap of over $3 trillion, it might feel like the best time to buy Apple's (AAPL -0.23%) stock has long passed. However, the company's shares have risen 56% year-to-date and 310% in the last five years, proving it continues to offer investors consistent gains.  

Meanwhile, Apple has a solid outlook thanks to its increasing smartphone market share and growing prospects in the future of artificial intelligence (AI). As a result, now is an excellent time to learn more about this tech giant before its shares rise any higher.

Here are three things about Apple that smart investors know. 

1. Outperforming Android amid market headwinds

An economic downturn in 2022 caused steep declines across tech as reductions in consumer spending burdened the market. However, demand for Apple's products persevered.

According to Counterpoint Research, in the second quarter of 2023, smartphone shipments fell 24% year over year. Phones running on Alphabet's Android took the hardest hit, with sales for Samsung and Motorola declining 37% and 17%. 

Apple couldn't avoid the market challenges, with iPhone shipments slipping 6% in the quarter. However, the company managed to use the poor conditions to its advantage, with its smartphone market share rising from 52% to 55%. Meanwhile, several Android-powered smartphone brands experienced declining market share. 

The jump is promising for Apple's future product sales as a whole, as the iPhone also remains its best tool in attracting consumers to its other devices and services. 

2. Massive potential in artificial intelligence 

Tech companies like Microsoft and Nvidia have taken center stage in this year's AI boom. Meanwhile, Apple has largely stayed out of the hype. However, the MacBook company has quietly invested in the industry, which could massively pay off over the long term.

At Apple's Worldwide Developer Conference in June, it unveiled several AI-driven software features which suggest the company could be pivotal in getting the technology into the hands of consumers. For instance, the iPhone's autocorrect will receive an update that uses a language model similar to OpenAI's ChatGPT to learn how users type. Additionally, AirPod Pros will now automatically turn off noise-canceling when the wearer starts a conversation. 

Moreover, a Bloomberg report from July 19 revealed Apple had created a framework for building AI language models and has developed a chatbot that engineers call Apple GPT. The company's massive dominance across consumer tech bodes well for its future in AI, with countless ways to successfully attract users to its offerings. 

3. A recession-resistant stock 

While last year's tech stock sell-off proved challenging for countless companies, it also highlighted the resilience of some businesses. The chart below shows Apple's stock experienced the lowest decline last year among the five biggest names in tech despite the economic hurdles. 

AAPL Chart

Data by YCharts.

Apple has garnered immense brand loyalty from consumers over the years with its walled garden of products and sleek designs, which allow it to charge a premium and keep earnings up.

In addition to stealing smartphone market share from Android, the company has performed similarly against its competitors in personal computing. In Q2 2023, global PC shipments fell 13% year over year. Companies like Lenovo and Dell experienced declines of 18% and 22%. However, the same quarter saw Apple's MacBook segment enjoy a 10% shipment rise. 

The company's growing dominance across tech has made it one of the most reliable investment options available. In fact, not only did Apple's stock outperform tech giants like Microsoft, Alphabet, Amazon, and Meta in 2022, but it has also enjoyed the most growth out of any of these companies over the last five and ten years.

With expanding market share for the iPhone and a developing AI division, Apple's stock looks like a promising investment right now.