How to get the media that owns a file?
You can use entityQuery:

$fid = 13141;
$usedIn = \Drupal::entityQuery('media')
  -&gt;condition('field_media_image.target_id', $fid)
  -&gt;execute();


Example response:

Array
(
    [15105] =&gt; 13109
)