Apple doesn’t. They created a market for products with a deep vertical integration of software and hardware. And they do it at enormous scale.
Google, Microsoft, and Amazon are the closest competitors but they license their software and have to compete on hardware across many products.