What engine are you using?
I use Godot and a web export is quite simple. I make sure to export the game to a new folder separate to the project folder naming the main Web page as "index.html", I then zip the folder for uploading to itch.io and then make sure to select the "play in browser" option for the uploaded file. You will also need to configure the other options on itch for web play which includes screen size of the game window on the page, and if you need "shared buffer array support" which I think Godot games need for web builds. There are also other options there that you can enable if you need them as well.