xxxxxxxxxx
use Drupal\node\Entity\Node;
use Drupal\paragraphs\Entity\Paragraph;
$entity = Node::load(1);
$entity->field_multi_ref = [
Paragraph::load(1),
Paragraph::load(2),
Paragraph::create([
'type' => 'new_paragraph_type',
'field_media_image' => [
'target_id' => 1,
],
]),
Paragraph::load(3),
Paragraph::load(4),
Paragraph::load(5),
];