This can be achieved by exporting your game in HTML version, engines usually offer built in tools to export in HTML version.
For Unity this is called WebGL export. After exporting your game in HTML version, just zip the game's folder and upload to itch.