If the product handle or collection in your URL doesn't match what's on the product page, this could be causing the 404 error.
On the product details page, scroll down to the Search engine listing preview section and click Edit website SEO. In the URL and handle box, you'll see the unique product handle. This should match the end of your product URL.
Also on the product details page, look for the Product organization section. This will show you which collections the product is part of. The collection name should match the collection in your product URL.
Remember that any changes to the product handle will also change the product URL. If you've recently changed the product handle, make sure to update any links that point to this product.
Let me know how you get on,
Moira | Social Care @ Shopify - Was my reply helpful? Click Like to let me know! - Was your question answered? Mark it as an Accepted Solution - To learn more visit the Shopify Help Center or the Shopify Blog