Almost everyone has said something about an item or a trip or a car they're interested in, and a few hours later, BOOM! There's an ad for that very same thing on your Facebook page, or on your Instagram.
It happened to me too! I got a ukulele for Father's Day and of course, was talking about it with my phone nearby. Within a few days, maybe less, I got an ad on Instagram for a Ukulele training app!
Now, I admit, it is POSSIBLE that somehow, I searched "ukulele" on Google and somehow Google got my info to the app people and they sent me an ad.
That is, after all, what Google is there for. The product Google provides isn't the search engine or Google Photos or the calendar.
Yes, YOU are the product that Google sells. More specifically, your information. They apparently collect everything you ever type in Google and root through it to see if there's something worth selling. Now that not be exactly how the people at Google would explain it, but that's what I understand.
Your iPhone on the other hand, is the product. That's Apple's way of making money; selling iPhone, not information.
This article explains it better than I can. Check it out here.