They are usually separate things. Cookies are produced/saved locally, to be read in the next visit (by the same website or maany websites basically forever unless you use firefox containers or at least clear them once in a while). There’s also local storage which is different but can also be used to identify you across the web. Ads, trackers, all of these categories are often made of many small components: you read a single article on a “modern” newspaper website, hundreds of connection are being made, different tiny scripts or icons or images are being downloaded (usually from different subdomains for different purposes but there’s no hard rule). It’s possible to block one thing and not another. For example I can block Google Analytics (googletagmanager) which is a tracker, but accept all of Google’s cookies.
I recently added a used mini pc to my lab and it has a Ryzen 3550H, 16GB ram and 512GB nvme; it cost less than 100€ total, hits almost 8000 passmark. Just to give you an idea of what you can get on the used market, I wouldn’t buy a new Celeron pc myself.