Not really. Instead, each time you return to a site that has set a cookie on your computer, that cookie is included in the request header.
That same site will also know about your last visited page, even if it's outside of their domain, because of the "referer" frpm the request header.
> So if I copy paste the website in the address bar, they dont learn anything about my last browsing habit?
If you do that, then the referer will be empty and whatever site you visit will not know what you did last.
Cookies are just one thing. Web beacons i.e. tracking pixels, and the fact that companies utilizing those to suck up data about web users sell it feely to others for the sake of targeted marketing, is the reason you see peronalized ads all over the internet whenever you've finalized an online purchase.