Hi
yes if you upgrade then all your customized code will be lost. So you need to create a child theme to be safe from customized code lost before making any changes in the code. We always recommended you to create a child theme before making any changes in the code.
Go to theme folder -> inc -> structure -> functions -> functions.php in line no 36 you have to add this line of code
wp_enqueue_script('wp-portfolio-scripts', get_template_directory_uri().'/js/scripts.js', array('jquery'), false, true);
So add all code from line 13-37
Thank you!