If you’re trying to change the HTML for the spinner that shows up between page loads then
discourse\helpers\loading-spinner.js
is probably not what you’re looking for. That helper generates the small spinner that you see in the composer and search menu… etc.
If you want to change the main spinner that shows up while pages are loading then you’re looking for this
You can override the template for that spinner like so
<script type="text/x-handlebars" data-template-name="components/conditional-loading-spinner">
{{#if condition}}
<!-- the html for your custom spinner goes here -->
{{else}}
{{yield}}
{{/if}}
</script>
in the </head>
tab of a theme / theme component and then add the required CSS for the custom spinner.