How humiliating it would be for a Magento 2 engineer to foster a total usefulness in light of the item ID and attempt to carry out it just to acknowledge in the end that it won't fill in as the item just doesn't exist in any case!!
The simple departure to such a circumstance is to check if product with SKU exists in Magento 2! Preceding utilizing the SKU anyplace, you want to check assuming that item exists in Magento 2 store or not.
On the off chance that the response is indeed, no one but you can involve the item SKU for additional circumstances.
For more info, visit https://meetanshi.com/blog/check-if-product-with-sku-exists-in-magento-2/