如何在自定义分类模板中获取分类名称?

I would like to show custom taxonomy name from a page to custom taxonomy template.

e.g My all taxonomies are displaying on a page(xyz) and when i click on particular taxonomy name it goes to my custom taxonomy template (taxonomy-mycustom_tax.php ) but in this page i could not get name of taxonomy from URL.

taxonomy name seeing in URL like(http:/site_name/cust_taxonomy/name_of_term/).

i have also tried like this way..

<?php 
$slugs = explode('/', get_query_var('category_name'));
$currentCategory = get_category_by_slug('/'.end($slugs));
?>

In order to get the taxonomy name in the taxonomy-taxonmyname.php file you can use the following code.

single_cat_title('prefix', bool $display=true );

The function has two arguements.

See more about this on https://developer.wordpress.org/reference/functions/single_cat_title/