How to get name of custom taxonomy

I believe you are talking about when the archive.php is used as a taxonomy page.

If so, you will first need to check if the current page being viewed is actually a taxonomy page. If you don’t do this check, you will get errors on pages that are not taxonomy pages, for instance date archive and category archive pages if they all make use of the archive.php template. The reason is, the queried object varies from page to page, the queried object is diffirent for a taxonomy page than for a date archive page

So you would wrap your queried object inside a is_tax() conditional check to make sure that the taxonomy name only displays on the taxonomy page.

To get a complete overview of get_queried_object() on a page/template, simply do the following

<?php
 $queried_object = get_queried_object();
 var_dump( $queried_object );
?>