Compiling in the browser has a fairly limited use case, so if you are working on a production site you should be precompiling your scripts server-side. See setup build systems for more information.
You can use
@babel/standalone as a precompiled version of Babel or run a bundler on Babel yourself. Check the usage section below for how to use it as a script.
You can also use the many online tools to prototype a script:
Online Editors that run Babel for you: