Editing SuperTable inside Matrix block
So you'll want to update the Super Table Block's content and to do that when in a Matrix field is a little tricky, but it can be done.
$matrixBlocks = $entry-&gt;matrixField-&gt;all();

foreach ($matrixBlocks as $matrixBlock) {
    $superTableBlocks = $matrixBlock-&gt;superTableField-&gt;all();

    foreach ($superTableBlocks as $superTableBlock) {
        $superTableBlock-&gt;setFieldValues(['lightswitchField' =&gt; true]);

        Craft::$app-&gt;getElements()-&gt;saveElement($superTableBlock);
    }
}