It depends — in Unity, you just need to download the WebGL Build Support module and build the project using that format.
After that, uploading it to itch.io is super simple — you can just follow a quick YouTube video tutorial and you’re good to go.