Are websites selling your browsing history to advertising companies?

The other day I was on Barnes and Noble's website and was looking for a book. The next day I was on YouTube and noticed an ad next to the video advertising the same book. Now last night, I was searching up chewy runts and am now having it advertised to me again. Has anyone else noticed this?
3 answers 3