Another way to stop it is to start writing software like this i safe-by-default languages like Rust and others instead of C++ with its numerous footguns.
Well, they tried to write a new browser engine in Rust but gave up and got laid off. A few pieces got integrated into Firefox but the browser is still wildly insecure (cf. the article).
Turns out "Rewrite it in Rust" is actually really hard when you have millions of lines of code. Even Google probably can't rewrite Chrome from scratch.
Maybe if we just try harder, communism will work. You gotta draw the line somewhere.
See https://chromium.googlesource.com/chromium/src/+/master/docs... for details.
Interesting quote: "(Some of us on Security Team aspire to get more of Chromium in safer languages, but that's a long-term, heavy lift.)"