I’m getting this error: “Cross origin requests are only supported for protocol schemes”

Total error message:
Access to script at ‘file:///C:/Users/sain0/Documents/HTML/Assignmentd/as8.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.

My HTML Code

I tried sending a list through the files

Exporting

Importing

I got the error, What are the solutions for this error?

I tried using modules and also tried defining module.