Update a content type field's allowed values programmatically
Those are settings, you get them using $ip_sec_zone_storage_values-&gt;getSetting('allowed_values'),, in there you'll find those settings, you can add another one, set the settings back with setSetting('allowed_values', $allowed_values) and then ->save() to save the field storage config:

$allowed_values = $ip_sec_zone_storage_values-&gt;getSetting('allowed_values');
// The new value.
$allowed_values[$ipseczone] = $ipseczone;
$ip_sec_zone_storage_values-&gt;setSetting('allowed_values', $allowed_values);
$ip_sec_zone_storage_values-&gt;save();