Website is not loading the script, CSS, or Three.js

Let me start out by saying that i have very little experience with html, javascript and overall website creation and hosting, so sorry in advance if the information i am providing is lacking.
I am trying to make a website by using a 3d object from three.js, however nothing is loading in the ‘live server’ (when i upload the entire website to cpanel), however when i use visual studio code to run it through my local server (through the command npm run dev) the website is showing as intended. I have screenshotted the pages:

correct page

incorrect page

When i open element inspect on the broken page, i get the following error through the console:

Failed to load module script: Expected a JavaScript module script but the server responded with a
MIME type of “text/css”. Strict MIME type checking is enforced for
module scripts per HTML spec.

and

Uncaught SyntaxError: Cannot use import statement outside a module

i have the following code in my script.js:

import './style.css'
import * as THREE from '../node_modules/three/build/three.module.js'
import { OrbitControls } from '../node_modules/three/examples/jsm/controls/OrbitControls.js'
import { GLTFLoader } from '../node_modules/three/examples/jsm/loaders/GLTFLoader.js'
import { HemisphereLight, Sphere, SRGB8_ALPHA8_ASTC_12x12_Format, sRGBEncoding, Texture, TextureEncoding } from '../node_modules/three/build/three.module.js'
import gsap from '../node_modules/gsap/all.js'

var gltfLoader = new GLTFLoader()
let tl = gsap.timeline()
var diamond = null

I am also using this to call the script in the index.html, however i am uncertain if this is the correct way of calling the script.

  <script type=module src="script.js"></script>

How would i be able to fix this? any help would be appreciated!