How to docreate a function to do if conditions dependign on content type name
You can set a variable in hook_preprocess_Hook function which has the content type and then use that variable in twig file.

$node = \Drupal::routeMatch()->getParameter('node');
  $nids = $node->nid->value;
  if($nids){
    $variables['content_type'] = $node->bundle();
  }