Get Node Author's Name in Custom Block
One way to go about this is block preprocess function to retrieve the block's current node context &amp; insert the relevant variables to be used by your Twig template. For example: 

/**
 * Implements hook_preprocess_HOOK() for block.html.twig.
 */
function MYTHEME_preprocess_block(&amp;$variables) {
  $node = \Drupal::request()-&gt;attributes-&gt;get('node');
  if (!is_null($node)) {
    $uid = $node-&gt;getOwnerId();
    $user = \Drupal\user\Entity\User::load($uid);
    if (!is_null($user)) {
      $username = $user-&gt;getDisplayName();
      $variables['$username'] = $username;
      // {{ username }} will be available within block.html.twig.
    }
  }
}