code: public function onInsert(ResourceEventInterface $event)
      {
          $item = $this->getShipmentItemFromEvent($event);
          $shipment = $item->getShipment();
  
          $this->scheduleShipmentContentChangeEvent($shipment);
  
          // If shipment state is stockable
          if (Model\ShipmentStates::isStockableState($shipment->getState())) {
              // Assign shipment item to stock units
              $this->stockUnitAssigner->assignShipmentItem($item);
          }
      }
docs: Insert event handler.
  
  @param ResourceEventInterface $event