Google sells ads not only on their search engine, but also on over 2.2 million other websites and over 1 million apps. Every time you visit one of these sites or apps, Google is storing that information and using it to target ads at you.
That’s why you may have seen ads tracking you across the net!
If you want to stop websites from re-marketing to you, you'll need to install a free tool like Privacy Badger https://www.eff.org/privacybadger which blocks trackers.