Background.
Web designers are in love with gigantic amounts of javascript on web pages. Many pages are larger than early computer game apps were. That is why they are slow to load, besides the ads, which you should be blocking (IMO) to help speed things up, and slow to run. The large java scripts also eat up memory that the browser uses.
Older browser? Low on memory?
Browser extensions may also run slowly, but if you are not a computer geek, you probably will not have many, or any, installed.
The cure depends on your browser. Some will pop up a notice to let you let the script run or kill it. If the script is vital to the web page running, that makes the page useless.
Some browsers have extensions you can load to kill javascript on the current page (or globally). to be honest, some sites are vastly improved this way ... nag popups, damned cookie warnings and so on, go away. But some pages just refuse to work without javascrript. Twitter is the worst, and people keep posting links to twitter on DU. Others use javascript to actually create the text you see in the browser.
Regardless of what browser you use, these are some simple explanations.
https://support.mozilla.org/en-US/kb/warning-unresponsive-script
https://www.computerhope.com/issues/ch001479.htm
Beyond that, it gets very technical.
There is a complexity bias in programming. Programmers feel that "simple is stupid" and jam the most complexity they can into web pages, when simple is actually beautiful. Just my opinion. Some load entire javascript libraries on each page, spare you the details.