Consider using a 'web export' compatible game engine, that makes it super easy. Godot includes web export for games made in their engine :)