How can I register an already uploaded unmanaged file as managed file?
I ended up creating a new managed file, pretty easy as the following:

$user = \Drupal::currentUser()-&gt;id();
    $image = File::create([
    'uri' =&gt; $image_local_path,
    'uid' =&gt; $user,
    'status' =&gt; FILE_STATUS_PERMANENT,
  ]);
  $image-&gt;save();