Your first section of code is correct. This means that if it doesn’t output anything, something else is going on and you need to debug your own code to figure out why that is. A good start is to validate that things you think are true are actually true, to look at raw data, and to give yourself feedback on why the if wasn’t true. For example, what is $post->ID? what do the raw results look like that come back from get_terms?
Get more information from your own code by doing stuff like this:
$postID = $post->ID;
$taxName="auteur";
echo "Getting posts in ta $taxName for post ID $postID"; // Output what the variables are before you use them
$terms = get_the_terms($postID, $taxName);
print_r($terms); // Look at the raw data you get back in case your foreach or output has an error in it
if (empty($terms)) { // Was it empty?
echo "terms empty or unset";
} elseif (is_wp_error($terms)) { // was there an error? If so print it out?
echo "there was an error";
} else {
foreach($terms as $term) {
echo $term->name ;
}
}