How to print term name inside wp post loop

You can access the terms with the get_the_terms function. You can pass the name of the taxonomy as well as the ID to the function. Make sure to grab the ID correctly inside the loop – get_the_ID() should work. After that it’s a matter of joining the results with comma separation. With array_merge you can add also additional arrays that you need.

  $x_terms = get_the_terms( get_the_ID(), 'any-taxonomy-slug');
  $y_terms = get_the_terms( get_the_ID(), 'another-taxonomy-slug');

  $terms = array_merge($x_terms, $y_terms);

  foreach($terms as $term):
     $term_names[] = $term->name;
  endforeach;

  $names = join( ", ", $term_names );