On MacOS, (last I heard) they use Bing to deliver results you see in spotlight. On iOS, I believe it’s Google by default, for which Google pays billions of dollars each year. Mine is set to DuckDuckGo.
Then there’s the in-app searches, which yield a lot of what you need without ever going to a proper search engine. Apps and push products, travel services, etc. through spotlight search results that take you directly into the app.
Believe it or not, Apple presents a big challenge to Google’s search business, which is why they pay so much to remain on Apple’s platform.