Print all the tags from a custom post type

To get the link of any term meta, use get_term_link() function.
https://developer.wordpress.org/reference/functions/get_the_terms/

So replace the_permalink() to echo get_term_link($term->term_id); inside your loop.

<a href="https://wordpress.stackexchange.com/questions/248855/<?php  echo get_term_link($term->term_id); ?>"><?php echo '<p>' . $term->name . '</p>';?> </a>

This link will redirect to tag archive page.
Hope this help!