How can I correctly configure multiple product URLs in SEO?

Now the products are configured incorrectly in shopify, they are available at three URLs
example:
https://woodtrick.com/collections/black-friday/products/monster-truck
https://woodtrick.com/collections/modern-machinery/products/monster-truck
https://woodtrick.com/collections/all/products/monster-truck

From the point of view of SEO it is not ok at all, it saves that it is canonical on one URL - but by good it is necessary that the goods should be available only on one URL and the most correct variant:
https://woodtrick.com/collections/modern-machinery/products/monster-truck - when the product is bound to a certain category in this case modern-machinery, is there no solution to fix this except rel=“canonical”

canonical URLs in the code are the way to solve this. You URLs from collections don’t matter to Google if the canonical URL is set to the product.

no, this 3 URL’s is in google index - you can check, canonical is not an explicit instruction to choose one page, it’s just a recommendation.