get the current archive term id$ code example
Example 1: get current term id
<?php $current_term = get_queried_object()->term_id; ?>
Example 2: wordpress get current taxonomy
$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
echo $term->name; // will show the name
echo $term->slug; // will show the slug