The require() stuff has fallen out of fashion as projects move to the ESM import style. React is battling it out with Vue and Svelte and HTML Web Components and native server-side components. It will keep changing very quickly for a while... no stability is in sight.
But if you're just coming back and you don't have to support legacy projects, just start with a new Next.js project and it will configure everything for you with sane defaults. It takes care of a lot of the mess you see in JS today.
If you're planning on rolling your own buildchain... eh... good luck.
For simpler sites you might not need any framework or toolchain at all. ECMAscript is pretty good since ES6, or you can use React without a toolchain too.
But yeah, it's a mess, especially if you have any experience with languages that aren't so... insane.