Use of Event catalog_category_change_products Magento 2.

Magento 2 uses catalog_category_change_products events to Checks if a category has changed products.

If you change an existing product from the category or adding new products to the category at that time, Magento use event for change products.

Declaration of the event from the vendor/magento/module-catalog/Model/ResourceModel/Category.php with a method, _saveCategoryProducts() that add logic for the Save category products relation.

create an events.xml file,  etc/adminhtml/events.xml

Create an Observer Class to handle the logic of the event,

Using the above way, you can fetch all the ids of the product that was changed during category save operation.

You can check the Complete List of all events in Magento 2.