echo a tax term in loop

I think you want to get the term link of the of each post. I will explain how you should get the answer for this.

First you will need get the term object of current post. Support your taxonomy name is ‘your_taxonomy’;

$terms = get_the_terms( $post_id, 'your_taxonomy' );

Because $term here is an array, in most case you will need the first one:

$term = $terms[0];

Then you can get the link to your term by using get_term_link function. You can use printf to make code easier to read:

printf(
    '<a href="https://wordpress.stackexchange.com/questions/314882/%1$s" title="%2$s">%2$s</a>',
    esc_url( get_term_link( $term ) ),
    esc_html( $term->name )
);

Because you will you this code in a loop, it makes sense to wrap all the logic in a function with two parameters (post ID and taxonomy name).