I feel that the best approach to dealing with thousands of spammy links appearing in your Search Console is to use the Disavow Tool in Google Search Console to disavow any spammy links. Additionally, I would suggest reaching out to webmasters hosting the spammy links and requesting them to remove the links. If the spammy links are present on your own website, then you can manually remove them from the webpages. You can also block the domains hosting the spammy links by adding their URLs to the robots.txt file. I would also recommend monitoring your website regularly to detect any new spammy links, as well as monitoring your backlink profile to keep a check on any new spammy links.
I feel that Shopify sites are becoming increasingly vulnerable to international search spam, which is when malicious actors target a website from countries outside of the typical search engine’s main market.