A CDN is basically you importing the script the old fashioned way aka: <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>
ESM build stands for ES module
aka, package that you will install in your project and use thanks to a bundler (like Webpack) and use it like this: import coolMethod from 'nice-package'
It goes to say, that you usually can do the same things with both imports, but the CDN one will often be more limited/less customizable/less optimizable. So, if you can use the ESM one, go for it.
This interesting articles compares CJS, AMD, UMD and ESM variants: https://dev.to/iggredible/what-the-heck-are-cjs-amd-umd-and-esm-ikm
As for the CDN one, I'd say that it is pretty much all the time the fallback and the worst one. For more info, you should probably use some google-fu here, since it's out of Stackoverflow's guidelines.