GET Taxonomy ID

If you’re on a taxonomy term archive page, you can access the current ID via get_queried_object_id():

echo function xyz( get_queried_object_id(), 'product_cat' );

You can also access the whole term object with get_queried_object():

$this_term = get_queried_object();
echo $this_term->term_id;
echo $this_term->name;
echo $this_term->description;
echo $this_term->taxonomy;
echo $this_term->parent;
echo $this_term->count;