Your mental model about how all this works is flawed. Just because a new technology replaces an old technology doesn't mean it's objectively "better." It just means it has better salesmen. Before Javascript, you absolutely could interact with a page, if it had Flash, or Director, or even Authorware in it. These weren't replaced because Javascript was "better," but because one guy formed some wrongheaded ideas about where the problems actually lay and convinced the world to go along (https://medium.com/codex/why-im-a-react-developer-571835b4408b).
The idea of a server-side rendered page with islands of interactivity is seeing a resurgence with technologies such as NextJs and Qwik, and Webassembly just takes it back to you have a plugin written in another language embedded in the page. The idea and technology weren't bad, they just needed to be rebranded to get all the techbros onboard.
We're living in a world of needless churn that's causing constant waste. You learn the latest hotness to stay relevant, then completely butcher the projects you do in it because you wasted so much time learning the hotness and the hotness before it that you don't have time to learn how to actually design sustainable software. But that's ok, you can blame it on the now-aging hotness and start a rewrite it in the new hotness, then move on to the next company now you have hotness on your resume before you get far enough along anyone realizes you created exactly the same problems in the rewritten version you had in the old version, because it's not the technology, it's you.
Note I don't mean you, the author, I mean you, the techbros of the world that are driving all this waste with their ADD.