get taxonomies id from cpt code example
Example 1: wordpress get taxonomy of a post
<?php $term_obj_list = get_the_terms( $post->ID, 'taxonomy_name' ); ?>
Example 2: woocommerce get post terms product
$term_obj_list = get_the_terms( $post->ID, 'taxonomy' );
$terms_string = join(', ', wp_list_pluck($term_obj_list, 'name'));
Example 3: get term id by post id
INSIDE TAXONOMY PAGES
$term = get_queried_object();
$term_id = $term->term_id;