As @The_Pixie stated, you must package your game and media assets in a zip file. The itch website will look for index.html in the top layer of your zip when “Run Game” is clicked.
In your game, your media must be called by relative urls to their location in the zip or a sub folder. (You can leave them in the same folder as index.html but if you have a lot of files in a big game that becomes disorganized. I make one “media” folder for images and sounds.)
So for this project, I’m zipping index.html and the media folder together, and uploading that to itch then specifying it’s played in the browser. Within the game, since I have media in a sub-folder, it is called inside Twine as existing at media/Ethernight Club.mp3. If you make multiple folders for say “images” and “sounds” you’d call images/tree.jpg or sounds/groovymusic.mp3 as necessary and include them all in the zip as well.
I also rename the default zip name from “Archive.zip” to the game name or a permanent acronym that I upload like “GameName.zip” and keep that consistent so when I re-upload to update, itch replaces that file instead of creating a new one with a different name.
Higher level process: I store the media folder(s) and the published index.html file in a subdirectory called “Publish” and when I update the game just publish the index.html by clicking to rename it as that, then re-zip if uploading. Often your media will remain the same so you don’t have to keep creating that folder, and can just swap updated media in it. You can play the game locally from the index.html in the publish folder that has the folders in place including all the media in your browser without uploading to itch, or to update online, re-zip/rename/upload.
When I work, the “elements” folder is collected media I’m potentially using in the game but hasn’t been edited or processed or included yet, full versions of music I’m clipping sections out of, and notes and anything else; the “Unused” folder is where I drop stuff that’s deleted from the game or has been changed, like if I change the music tempo or update an image I’ll drop the old version in Unused to refer back to if I change my mind.
The Publishing Twine Games on Itch.io page of the official Twine Cookbook also has instructions for uploading a project that includes external media (eg. audio, image, video) files.
Also of interest if wanting it to play in browser there:
ZIP file requirements
There are a couple of requirements for ZIP files in place to prevent abuse and to ensure a suitable experience for people running your project in their browser:
The ZIP file should not contain more than 1,000 individual files after extraction.
The maximum length of a file name including path should not be greater than 240 characters long.
The size of all the extracted content should not be greater than 500MB.
The size any single extracted file should not be greater than 200MB.
The filenames are case sensitive and should be encoded as UTF-8
They’re pretty generous and you only need to work with them if you have an enormous game.
File size limit: 1 GB. Contact us if you need more space
They have a whole page of information where that “ZIP file requirements” came from:
Upload a ZIP file containing your game. There must be an index.html file in the ZIP . Or upload a .html file that contains your entire game. Learn more