There are a number of methods. I will show you the easiest way using a web browser.
Examples of cookies that can break GDPR:
All these 3rd party services and many others should be called only after the user gives his explicit consent.
Privacybunker provides a service to check your website for GDPR violations withour any extra effort. It is safe and non intrusive tool.