How to render an element, that was saved as a template, using a hook?

You can create a template tag in your functions.php file like so:

if ( ! function_exists( 'mytheme_reusable' ) ) :
     function mytheme_reusable() { 
           //put your HTML or whatever code you need here
     }
endif;

You can then simply apply the template tag in any template exactly where you need it:

<?php mytheme_reusable(); ?>

Alternatively you can also then apply it via add_action, like so:

add_action( 'wp_footer', 'render_reusable', 1 );
function render_reusable() {
    mytheme_reusable();
}

get_footer(); is intended to include your footer.php content. I set the priority as 1 assuming you wanted it to load before the scripts. Question though, if you’re loading this on tons of pages then you may just want to put your template tag directly into the footer.php file and then if necessary write some conditions to prevent it from loading on some pages.