How to use dependency injection to apply a class static method?
In __construct() you can implement like this:

use Drupal\Core\Entity\EntityTypeManagerInterface;

public function __construct(EntityTypeManagerInterface $entity_type_manager) {
    $this-&gt;entityTypeManager = $entity_type_manager;
}


and create() method

public static function create(ContainerInterface $container) {
    return new static(
      $container-&gt;get('entity_type.manager'),
    );
}


You can use this service to get the file storage:

$file_storage = $this-&gt;entityTypeManager()-&gt;getStorage('file');


and then load the file:

$file = $file_storage-&gt;load($fid);