How do I make my program into an executable file?

I have made a program that I open in the web browser with a html file. The program works fine in Firefox, but not other browsers. I thought it would be better if I could open the program by itself instead of in a browser. Any way to fix the error that I’m getting would work aswell. The error is “TypeError: Failed to fetch” when I try to load images using this method 7.8: Objects and Images - p5.js Tutorial - YouTube.
Also, is there any way to play sounds in the browser without enabling CORS?