Find all the spam inbound links to your website, you can use Ahrefs or Moz for this. Create a disavow file that includes all the spam links and upload the file to Google here: Google Search Console
The next time your website is crawled, Google will ignore the links you disavowed and hence this will lower your spam score.