A bundled JS and compiled executable file can both be distributed.

They both uploaded and attached as an asset on a GitHub Release. Use can even use GH Actions as CI to do this for you.

Those assets be downloaded and run by others.

Someone might download your binary and run it directly.

You might use the bundle JS file in your own site’s index.html page. Or serve it as a JS file or others to use. Like on NPM you can include your dist directory as assets, for use as NPM package installs.