You can get the product category IDs from the product object using Magento 2.
You can retrieve all the category IDs assigned for products at any place, using the below code snippet.
Continue reading “How to Get Category IDs from the product in Magento 2?”