Use following code snippet to get node field values
This is used to get node id from url
$nid = \Drupal::routeMatch()->getRawParameter($node_id);
To load node data using nid
$node = \Drupal::entityManagerentityTypeManager()->getStorage('node')->load($nid);
This is used to get field value.
$terms = $node->get('field_Name')->getValue();
This is used to get node title.
$product_name = $node->getTitle();