Set value of List field of a node with multiple values
You can replace the complete content of a field by assigning an array:

$node-&gt;field_multivalue = [
  ['value' =&gt; '1'],
  ['value' =&gt; '2'],
  ['value' =&gt; '3'],
];


If you want add another value to the field you can use the field like a php array:

$node-&gt;field_multivalue[] = ['value' =&gt; '4'];


You can omit the main property of a field:

$node-&gt;field_multivalue[] = '5';


Now you have 5 values in the field.