How do I set a content entity field as required? How do I make a field in a content entity required in Drupal 8?
I tried FieldConfigInterface::setRequired(), but it doesn't seem to work.
You need to use the ->setRequired(TRUE) option on the field. IE

$fields['source_id'] = BaseFieldDefinition::create('entity_reference')
      -&gt;setLabel(t('Thingy'))
      -&gt;setDescription(t('Pick a thingy'))
      -&gt;setSetting('target_type','thingy')
      -&gt;setRequired(TRUE)
      -&gt;setDisplayOptions('form', array(
        'type' =&gt; 'options_select',
        'weight' =&gt; 5,
      ))
      -&gt;setDisplayConfigurable('form', TRUE);


You will also need to uninstall and then reinstall your module to have the change reflected in the database before this will work.