get the post by term id code example
Example: get term id by post id
INSIDE TAXONOMY PAGES
$term = get_queried_object();
$term_id = $term->term_id;
INSIDE TAXONOMY PAGES
$term = get_queried_object();
$term_id = $term->term_id;