That's true in the U.S., but not globally. Worldwide, Samsung sells more smartphones than Apple.
Apple, however, has an exceptionally loyal customer base. Many users stay within the Apple ecosystem for years and are willing to pay premium prices for new products. That kind of cult loyalty gives Apple more pricing power than most companies enjoy.
I have owned refurbished Pixels for 20% of Apple's, and they're good enough for most users. No matter if we have 1, 3, or 10 million, it will never be an Apple product. Same thing for refurbished PCs.
If I were Apple, I'd consider raising prices by 10% annually.