You can use conditional operators in WordPress to enqueue scripts on specific pages of your Website.
function load_script_for_single_post(){
if(is_single()){
wp_enqueue_script(
'some',
get_template_directory_uri().'/js/some.js',
array('jquery),
'1.0.0',
false
);
}
}
add_action('wp_enqueue_scripts','load_script_for_single_post');
In the above example, if the current webpage is single post, script will be enqueued. Otherwise wp_enqueue_script function will not be executed.