Steps for web gl build in unity: Make sure you have web gl module installed in unity hub:
if you can’t select it here then it means you need to install the module.
Once you have web gl installed and you restart unity, you can go to build settings window and click on WebGL, choose “Switch Platform”.
Next in the bottom left click Player Settings button (on the same window you’re on)
select webGL tab:
Choose these settings:
Publishing Settings (Important)
(Needs Gzip, Decompression Fallback = on)
Now you are ready to build (make sure your scenes are in the build index
Any scene not here wont be in the game on build#
Select Build:
Next choose an empty folder (must be empty, you can make a new one)
once the game is built, open the folder it output into and select all files > Send to zip
Make sure it’s the files in the folder, not the whole folder itself.
Now you can upload this .zip file to Itch.io game page.
This should provide you a perfect working web-build!