I have one of my installed browsers set to clear cookies and stuff every time I close it. This way, whenever I go to YouTube, it has no idea who I am or what other videos I have watched in the past. The results I get are purely a function of the search terms, with no interference from a recommendation algorithm.
That's how I protect myself from this effect. I highly recommend it to anyone who is concerned.
Of course, Facebook does the same thing, putting all of its users in little echo-chambers that only show it news articles that reinforce what they already believe, creating an illusion of worldwide agreement with them, and giving their opinions a feel of objective truth. My solution to that is: don't use Facebook.
Anyway, if these recommendation algorithms became outright illegal in these contexts, I wouldn't shed a tear. I don't mind them for something like Amazon that wants to know how old your kid is so it can recommend gifts that are age-appropriate or whatever. It's a bit creepy but actually useful and doesn't seem to have this side effect. Not so in the case of information feeds.