Yes, you would have to buy from the merchant linked in the piece. Cookies can have different expiration periods though, they could be 90 days - but obviously if you regularly delete your cookies and do so after clicking the link but before making a purchase, then no money would be made from the link.On affiliates - presumably that only works if you click on the link and then buy from that same website (even if up to 30 days later).
Cookies can do all sorts of things, but if you don't want to get sponsored ads, use incognito mode when you browse for purchases.