A number of the things you list are barely even Javascript's job. Like Dark Mode is mostly the work of CSS. In fact, apart from remembering the state it can be implemented WITHOUT JavaScript using a simple checkbox and the adjacent sibling selector. The only thing JS has to do is save the state of the checkbox in localstorage and reset that state when the page loads (if a save is present)
More of the stuff you list -- like those garbage full-screen video backgrounds and pointless distracting animations--only waste bandwidth and piss off users. They add NOTHING of value to a page, oft get in the way of users actually accomplishing whatever task they landed on the site for, and are the typical accessibility wrecks.
A lesson PayPal had to learn the hard way seven or eight years ago when they crapped their own bed by putting a video background on their home page... that didn't even last a month before it had a serious negative impact on both hosting cost, server load, and traffic.
And with background-attachment:fixed; you don't need script-tardery to do parallax backgrounds anymore. This isn't 2009. Just like how we don't need scripting for smooth scrolling anymore, or the dozens of other things we NEVER should have been using JS for in the first place.
At the end of the day, half what you're talking about isn't JavaScript's job, and the other half lead to bad UI and worse UX.