Plugin’s required JS not being inserted in my theme

Hey by using enqueue script to add all js and css file

    wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );

Example here

 /**
 * Proper way to enqueue scripts and styles
 */
function theme_name_scripts() {
    wp_enqueue_style( 'style-name', get_stylesheet_uri() );
    wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true );
}

add_action( 'wp_enqueue_scripts', 'theme_name_scripts' )

i am sure it work fine