You'd have to block requests to third parties. This is hard because it breaks most websites - all those that rely on cdns. You can wade through this with a script blocker like ublock origin and a whitelist but you don't really know what's happening unless you investigate each domain and script.
Even then you'd still be exposed to fingerprint tracking served through the original domain passing on to a third party at the back end.
Tracking isn't fixable with technological solutions alone.
It's been the default in Safari since day one.
It is necessary but insufficient, because otherwise tracking Safari users would never have been possible. Despite that WebKit has had to consistently devote engineering effort into making these privacy invasions impossible.
WebKit, and I think Firefox now?, had to do further work to isolate same domain cookies to specific contexts.
At the same time there is Chrome, aggressively pushing new features that often happen to add new tracking mechanisms.
Google and Facebook depend on invading user privacy, that is their primary source of income. If there is any way they can track you, they will use it.
The only solution is legal, coupled with actual enforcement.
All browsers already have a setting whether to accept third-party cookies. It's just a matter of changing its default value.