For Drupal 8 get node title is not as straight forward as it used to be in Drupal 7. We used to have

$title = drupal_get_title();

for Drupal 8 we have something else.

In Drupal 8 you can get the node title from your theme’s YOURTHEME.theme file like so

function YOURTHEME_preprocess_page(&$vars){
  if ($node = Drupal::request()->attributes->get('node')) {
    $node = Drupal::routeMatch()->getParameter('node');
    $my_title = $node->getTitle();
 }
}

For more info about Drupal set/get node title visit

https://www.drupal.org/node/2067859

Click the heart icon if this helped, Cheers!