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

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="catalog_category_change_products">
        <observer name="category_product_change_ids" instance="Jesadiya\CategoryProductChange\Observer\CategoryProductIds"/>
    </event>
</config>

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

<?php
namespace Jesadiya\CategoryProductChange\Model;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;

class CategoryProductIds implements ObserverInterface
{
    /**
     * @param Observer $observer
     * @return void
     */
    public function execute(Observer $observer): void
    {
        $productIds = $observer->getEvent()->getProductIds();
        /// ADD YOUR LOGIC FOR THE OBSERVER
    }
}

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.