By exactly the same mechanism you are using to pull in the jQuery library. If you take all that code you have in your script block there, and put it in a file called, for example, myScript.js, and you upload that script file to a document library somewhere (maybe the same place you have the jQuery file?), you can make the embedded HTML:
<script type="text/javascript" src="https://xxx.sharepoint.com/Style%20Library/Scripts/jquery132.min.js"></script>
<script type="text/javascript" src="https://xxx.sharepoint.com/Style%20Library/Scripts/myScript.js"></script>
<h1>Heading Title</h1>
If you are not putting your script file in the same place as the jQuery file, then obviously make the src URL for the link to your script file point to the correct URL for your script file.
Addressing your comment - to add HTML in a similar way, you can create an HTML file with no html, head or body tags, just assume what's in that file will be inside the body, add that to a library somewhere in SharePoint, then put a Content Editor Web Part on the pages where you want that HTML, and use the Content Link property of the CEWP to link back to your HTML file.
So for instance, you could put your two script links and your one h1 and make a three line HTML file myMarkup.html. Upload that to, for instance, a folder called "Html" in the Style Library of your site. Then put a CEWP on the pages where you want to load those scripts and HTML, and in the Content Link property of the CEWP, put the URL to the HTML file:
https://xxx.sharepoint.com/Style%20Library/Html/myMarkup.html

That will inject your HTML as-is into the page.