How do I add conditional fields to a paragraph?
I've used form states with these pre-requisites:

Form states with paragraphs
The content widget used is: Inline Entity Form - Complex
The widget should be changed, not the field

There is this content type with the paragraph reference with a two-fields paragraph: content reference and content number. The content reference field cardinality is 5, and the number of content is a select list (1, 2, 3, or 5). So, the logic is used to enable the content input according to the number of content selected.
This was the solution I've used, hopefully, it can help someone else:
/**
 * Implements hook_field_widget_WIDGET_TYPE_form_alter().
 */
function HOOK_inline_entity_form_entity_form_alter(&amp;$entity_form, &amp;$form_state) {
  if ($entity_form['#entity_type'] === 'paragraph' &amp;&amp; $entity_form['#bundle'] === 'PARAGRAPH_BUNDLE') {
    $parents = $entity_form['#parents'];
    // It needs to get the parent form (content type form field) in order to work fine.
    $identifier = $parents[0] . '[' . implode('][', array_slice($parents, 1)) . ']';
    // I need to use the target_id to aim the wdiget.
    // The first input should be shown if I select 1, 2, 3, or 5 content to be added.
    $entity_form[&quot;field_content_reference&quot;][&quot;widget&quot;][0][&quot;target_id&quot;]['#states'] = [
      'enabled' =&gt; [
        'select[name=&quot;' . $identifier . '[field_content_number]&quot;]' =&gt; [
          ['value' =&gt; 1],
          'or',
          ['value' =&gt; 2],
          'or',
          ['value' =&gt; 3],
          'or',
          ['value' =&gt; 5],
        ],
      ],
    ];
    // The second input should be shown if I select 2, 3, or 5 content to be added.
    $entity_form[&quot;field_content_reference&quot;][&quot;widget&quot;][1][&quot;target_id&quot;]['#states'] = [
      'enabled' =&gt; [
        'select[name=&quot;' . $identifier . '[field_content_number]&quot;]' =&gt; [
          ['value' =&gt; 2],
          'or',
          ['value' =&gt; 3],
          'or',
          ['value' =&gt; 5],
        ],
      ],
    ];
    // The third input should be shown if I select 3, or 5 content to be added.
    $entity_form[&quot;field_content_reference&quot;][&quot;widget&quot;][2][&quot;target_id&quot;]['#states'] = [
      'enabled' =&gt; [
        'select[name=&quot;' . $identifier . '[field_content_number]&quot;]' =&gt; [
          ['value' =&gt; 3],
          'or',
          ['value' =&gt; 5],
        ],
      ],
    ];
    // The rest of the input should be shown if I select 5 content to be added.
    $entity_form[&quot;field_content_reference&quot;][&quot;widget&quot;][3][&quot;target_id&quot;]['#states'] = [
      'enabled' =&gt; [
        'select[name=&quot;' . $identifier . '[field_content_number]&quot;]' =&gt; ['value' =&gt; 5],
      ],
    ];
    $entity_form[&quot;field_content_reference&quot;][&quot;widget&quot;][4][&quot;target_id&quot;]['#states'] = [
      'enabled' =&gt; [
        'select[name=&quot;' . $identifier . '[field_content_number]&quot;]' =&gt; ['value' =&gt; 5],
      ],
    ];
  }
}