2 More accurate answer
source | link

I don't know you guys get solution or not but here you go.

 $sourceItem = [];
    // Magento\InventoryApi\Api\SourceRepositoryInterface;
    $source = $this->sourceRepository->get('default');

    $sourceItem['name'] = $source->getName(); // source name
    $sourceItem['source_status'] = true;
    $sourceItem['notify_stock_qty'] = 1;
    $sourceItem['notify_stock_qty_use_default'] = 1;
    $sourceItem['initialize'] = 1;
    $sourceItem['record_id'] = 'default' // your source code
    $sourceItem['quantity'] = 12; // your qty

    //Magento\InventoryCatalogAdminUi\Observer\SourceItemsProcessor;
    $this->sourceItemsProcessor->process('sku', $sourceItem);

Here is the solution https://magento.stackexchange.com/a/262873/49826

I don't know you guys get solution or not but here you go.

 $sourceItem = [];
    // Magento\InventoryApi\Api\SourceRepositoryInterface;
    $source = $this->sourceRepository->get('default');

    $sourceItem['name'] = $source->getName(); // source name
    $sourceItem['source_status'] = true;
    $sourceItem['notify_stock_qty'] = 1;
    $sourceItem['notify_stock_qty_use_default'] = 1;
    $sourceItem['initialize'] = 1;
    $sourceItem['record_id'] = 'default' // your source code
    $sourceItem['quantity'] = 12; // your qty

    //Magento\InventoryCatalogAdminUi\Observer\SourceItemsProcessor;
    $this->sourceItemsProcessor->process('sku', $sourceItem);

I don't know you guys get solution or not but here you go.

Here is the solution https://magento.stackexchange.com/a/262873/49826

1
source | link

I don't know you guys get solution or not but here you go.

 $sourceItem = [];
    // Magento\InventoryApi\Api\SourceRepositoryInterface;
    $source = $this->sourceRepository->get('default');

    $sourceItem['name'] = $source->getName(); // source name
    $sourceItem['source_status'] = true;
    $sourceItem['notify_stock_qty'] = 1;
    $sourceItem['notify_stock_qty_use_default'] = 1;
    $sourceItem['initialize'] = 1;
    $sourceItem['record_id'] = 'default' // your source code
    $sourceItem['quantity'] = 12; // your qty

    //Magento\InventoryCatalogAdminUi\Observer\SourceItemsProcessor;
    $this->sourceItemsProcessor->process('sku', $sourceItem);