How to load fields by target type? I'm having a content type with referenced fields of paragraph type. How to get referenced fields in hook_form_alter?

Here are my fields:

[field_media_audio] =&gt; Drupal\field\Entity\FieldConfig Object
        (
            [deleted:protected] =&gt; 
            [fieldStorage:protected] =&gt; Drupal\field\Entity\FieldStorageConfig Object
                (
                    [id:protected] =&gt; node.field_media_audio
                    [field_name:protected] =&gt; field_media_audio
                    [entity_type:protected] =&gt; node
                    [type:protected] =&gt; entity_reference_revisions
                    [module:protected] =&gt; entity_reference_revisions
                    [settings:protected] =&gt; Array
                        (
                            [target_type] =&gt; paragraph
                        )

                    [cardinality:protected] =&gt; -1
                    [translatable:protected] =&gt; 1
                    [locked:protected] =&gt; 
                    [persist_with_no_fields:protected] =&gt; 
                    [custom_storage] =&gt; 
                    [indexes:protected] =&gt; Array
                        (
                        )

                    [deleted:protected] =&gt; 
                    [schema:protected] =&gt; 
                    [propertyDefinitions:protected] =&gt; Array
                        (
                            [target_id] =&gt; Drupal\Core\TypedData\DataReferenceTargetDefinition Object
                                (
                                    [definition:protected] =&gt; Array
                                        (
                                            [type] =&gt; integer
                                            [label] =&gt; Drupal\Core\StringTranslation\TranslatableMarkup Object
By what you can see in this var dump the field can hold any paragraph type, so you don't know which fields it may contain.

When you have restricted the field to one paragraph type, then load the field defintions for this type: 

$fields_paragraph = \Drupal::service('entity_field.manager')
  -&gt;getFieldDefinitions('paragraph', 'my_paragraph_type');