Google provides us with a tool they call the Disavow Tool. It allows websites to list backlinks that they don’t want counting as part of their site’s backlinks. Some backlinks may harm your SEO efforts and are considered “spammy.” But Google has said that they are pretty good now at realizing a poor quality backlink and not using it so you may not have to list these links at all.
You should only use the Disavow Tool if you know your site is being penalized. You can find this out from Google Search Console. Doing so prior to any issue may hurt your SEO if you disavow links that Google thought were good.