code: public function onDelete(ResourceEventInterface $event)
      {
          $delivery = $this->getSupplierDeliveryFromEvent($event);
  
          if (null === $order = $delivery->getOrder()) {
              $changeSet = $this->persistenceHelper->getChangeSet($delivery);
              if (array_key_exists('order', $changeSet)) {
                  $order = $changeSet['order'][0];
              }
          }
          if (null === $order) {
              throw new Exception\RuntimeException("Failed to retrieve supplier order.");
          }
  
          // Clear association
          $delivery->setOrder(null);
  
          // Trigger the supplier order update
          if (!$this->persistenceHelper->isScheduledForRemove($order)) {
              $this->scheduleSupplierOrderContentChangeEvent($order);
          }
      }
docs: Delete event handler.
  
  @param ResourceEventInterface $event