How to get all field names of field type

Components

To get a list of all field names for the fields whose field type is for example image you can use the entity_field.manager service:

$field_map = \Drupal::service('entity_field.manager')->getFieldMapByFieldType('image');

The field_map array will contain a list of fields by entity type.

Drupal 9 - Field names by field type
Drupal 9 - Field names by field type