Jacob I would like to know if it is possible to return the HTML template from different files instead of the same code block.
Yes it is possible. Suppose you have a file my_shortcode.php
with the following HTML
<div>
<h1>'. $atts['title'] .'</h1>
<h2>'.$atts['sub_title'].'</h2>
</div>
And modify your shortcode similar to this code.
function my_shortcode_render( $atts ) {
$atts = shortcode_atts( array(
'title' => 'Default Title',
'sub_title' => 'Default Sub Title'
), $atts, 'bartag' );
ob_start();
include_once 'PATH_TO_FILE/my_shortcode.php';
return ob_get_clean();
}