Print post category name from a custom post type wordpress

You shouldn’t use the flush_rewrite_rules function like that read the docs https://codex.wordpress.org/Function_Reference/flush_rewrite_rules#Usage

In the param “template” you have an error:

<?php the_taxonomies(array('template' => '% %l')); ?>

<?php the_taxonomies(array('template' => '%s %l')); ?>

If you are using the default value just call the function without any params

Edit: I use this code when I want just one term from a custom taxonomy:

// note the [0] beacuse the wp_get_post_terms returns all the terms from the post
$tc = wp_get_post_terms(get_the_ID(), 'categorias');
if( !is_wp_error($tc) && !empty($tc) ){
    $categoria_name = $tc[0]->name;
    $categoria_slug = $tc[0]->slug;
}