So far as anyone can tell, it’s not your phone picking up on key words and associating them with you.
Mostly it’s one of two things:
One: Rampant data collection and implied likelihood that an advert is relevant to you based on that data.
For example, Facebook and Twitter ask you to upload your address book so they can find your friends. This means that those friends are linked to you, along with their status/preferences. Got a lot of £50k+ earning friends in your phonebook? Facebook’s going to guess you’re probably in the same bracket. Got a few friends going to Greece on holiday? Twitter’s going to start showing you similar adverts for those holidays.
But it goes further than that. Connect to work’s wi-fi? The network’s are going to assume you work there and start determining what level of decision-making you have so they can target business-related ads to you.
Downloaded a pregnancy app? Facebook will find out and start serving related ads to you within twelve hours
It’s not difficult to imagine that if someone in your network - potentially just someone in your phonebook, not necessarily connected to you on social media - is going through some heavy medical stuff, the networks will run some probability calculations on you and judge you to be at risk to some extent too.
Two: It’s a case of Baader-Meinhof and it’s totally coincidence.
Or, of course, it’s a combination of the two.