what is the correct way to programmatically set checkboxes (MultiOptionsFieldData) in a migration? (solved)
Sleeping on it (and peeking at the db) provided a solution, with even simpler code:
$entries = \craft\elements\Entry::find()
  -&gt;section('sectionProduct')
  -&gt;all();

foreach($entries as $entry) {
  $entry-&gt;setFieldValue('distribution', [&quot;1&quot;, &quot;2&quot;]);
  Craft::$app-&gt;getElements()-&gt;saveElement($entry);
}

where &quot;1&quot; and &quot;2&quot; are the values associated to the checkboxes.
If you know the checkbox values, use setFieldValue and pass them as an array:

[] (empty) no checkboxes selected
[&quot;single value&quot;]
[&quot;multi&quot;, &quot;values&quot;]