Programmatically create a paragraph entity reference field
The following code did the trick for me when adding the field to custom entity. This provides a reference to the paragraph and the revision. Just to note out that when the paragraph is edited, the reference field will still refer to the old revision. The field type is entity_reference_revisions and my paragraph type 

$fields['social_media_id'] = BaseFieldDefinition::create('entity_reference_revisions')
  -&gt;setLabel(t('Skill'))
  -&gt;setDescription(t('The ID of the skill'))
  -&gt;setRevisionable(TRUE)
  -&gt;setSetting('handler', 'default:paragraph')
  -&gt;setSetting('handler_settings', ['target_bundles' =&gt; ['social_media' =&gt; 'social_media']])
  -&gt;setSetting('handler_settings', ['negate' =&gt; 0])
  -&gt;setTranslatable(TRUE)
  -&gt;setDisplayOptions('form', [
    'type' =&gt; 'entity_reference_autocomplete',
    'weight' =&gt; 5,
    'settings' =&gt; [
      'match_operator' =&gt; 'CONTAINS',
      'size' =&gt; '60',
      'autocomplete_type' =&gt; 'tags',
      'placeholder' =&gt; '',
    ],
  ])
  -&gt;setDisplayConfigurable('form', TRUE);