How to enqueue CSS and JS only on specific template?

You are already doing things properly (in enqueueing CSS and JS files only on specific template) and is_page_template() is indeed a function you can use to check if the current or a specific Page or post is using a certain Page Template — i.e. a template having the PHP comment Template Name: <name here> at the top of the file.

However, the function works only with static Pages or posts that have an entry in the WordPress’ posts database table which then enables you to select a Page Template for that specific Page or post. Or which enables you to programmatically (e.g. using the update_post_meta() function) set the page template for that Page or post:

update_post_meta( 123, '_wp_page_template', 'your-template.php' ); // 123 is the post ID

But for dynamic pages like the home page when it’s set as the blog page which displays the latest posts, is_page_template() will likely return false, so for the blog page, I’d just use is_home() which is one of the many conditional tags in WordPress:

function my_theme_styles() {
    if ( is_home() ) {
        // Enqueue styles for the home/blog page.
    }

    // Enqueue other styles.
}
add_action( 'wp_enqueue_scripts', 'my_theme_styles' );

function my_theme_scripts() {
    if ( is_home() ) {
        // Enqueue scripts for the home/blog page.
    }

    // Enqueue other scripts.
}
add_action( 'wp_enqueue_scripts', 'my_theme_scripts' );

So for such dynamic pages, it’s not easy to determine the exact template being used, but instead of checking against the template, you could just use the relevant conditional tag like is_home(), is_front_page(), is_category(), etc. 🙂