Understanding CJS, AMD, UMD, and ESM in JavaScript

When working with JavaScript projects, you may come across acronyms like CJS, AMD, UMD, and ESM.