Adding elements to a field widget
Make sure you include the following:

use Drupal\Core\Form\FormStateInterface;
use Drupal\field\Entity\FieldConfig;


I'm assuming your function mymodule_form_field_config_edit_form_builder() looks something like this:

/**
 * My module form builder to map values to third party settings.
 */
function mymodule_form_field_config_edit_form_builder($entity_type, FieldConfig $field, &amp;$form, FormStateInterface $form_state) {
  $field-&gt;setThirdPartySetting('mymodule', 'help_page_id', $form_state-&gt;getValue('help_page_id'));
}


In your widget form alter you'd access the settings with with FieldConfig. This would add it to all field types, you can check $field_name if you want to filter it a bit.

function mymodule_field_widget_form_alter(&amp;$element, \Drupal\Core\Form\FormStateInterface $form_state, $context) {
  $field_name = $context['items']-&gt;getName();
  $field = FieldConfig::loadByName('node', 'myentity', $field_name);
  $help_page_id = $field-&gt;getThirdPartySetting('mymodule', 'help_page_id');
}