A more likely explanation is that LinkedIn knows where you are from location data and they might know where your friends are because they have the app installed (they can otherwise purchase location data that's collected and shared from a billion other apps). Then they see that you and Alice were in the same location for the past hour while Bob, who was also there, was looking up stuff you were talking about on google. Then LinkedIn shows you ads for that stuff because they suspect a discussion had been happening about the things Bob was looking up.
A common retort I've seen to that is, "Nobody made any such searches during the conversation." So I try a different route: how does LinkedIn know what's relevant to advertise to you based on conversations that are picked up on your microphone?
Let's assume LinkedIn can isolate the voice of every individual on the planet (or, perhaps more relevant, every individual in your home town) and Alice is talking to you about their new air fryer such that it's picked up by your phone's microphone. LinkedIn might advertise air fryers to you because they think Alice was talking to you about air fryers.
But what if Charlie is telling Dave -- both of whom you don't know and are only near you because you're waiting in line at the grocery store -- about their new air fryer? LinkedIn can advertise air fryers to you but that won't necessarily be so eerily relevant. How would LinkedIn know to show you air fryers because Alice was talking to you about them but not to show you air fryers because Charlie was talking to Dave about them? Both conversations were picked up by your phone's microphone so, ostensibly, they would both be equally relevant for advertising.
(That's all assuming that they can hide the otherwise-inexplicable battery usage of an always-on microphone.)
Not to downplay the creep factor, just pointing out that they are probably not disregarding established audio-recording law and are instead doing other surveillance things to show you such relevant advertisements.
So you had a bold claim but didn’t put effort in to find commensurate evidence and it was clear to you.