Javascript file not included only on home page

This might be because of two issues:

  1. Unique handler is not used to enqueue scripts on homepage
  2. Path to the file is wrong

Unique Handler

You should use unique script handler while enqueuing scripts or styles using wp_enqueue_*, I see that you used script as your script handler which is pretty generic and is not recommended. If you have used the same handler for one or more scripts, only the first script will be enqueued, the other ones will be ignored.

Path to script

get_stylesheet_directory_uri() . '../js/script.js' this path goes to a parent directory of current theme and looks for js folder which I think seems to be wrong, do you have the script file there?