1) If you need to add the code to header.php file then copy header.php from the parent theme to child theme folder and make all the changes in child theme header.php file. The same situation with other files (not theme functions!) you want to edit. Read more about child themes and how it works https://developer.wordpress.org/themes/advanced-topics/child-themes/
2) XStore theme supports PHP 7, so I would recommend you to update XStore to 220.127.116.11, update all the included plugins (https://www.8theme.com/downloads) and then feel free to update PHP to 7.x.