Get proper block title from block object
If you were using hook_preprocess_block() it would be much easier to get the title, you would simply load the block by its id and get the label from the returned block object like this:

function hook_preprocess_block(&amp;$variables) {
  $variables['new_title'] = \Drupal\block\Entity\Block::load($variables['elements']['#id'])-&gt;label();
}