NoScript and uBlock Origin are what I use. My two must-have extensions for any browser I regularly use.
With NoScript, I started off with everything blocked, and just stuck the extension icon into the toolbar. Whenever a site wouldn't load properly, I'd temporarily enable the JS just for that single domain, and see if that got it to work. If it didn't, I would usually poke about and see what other domains need to be unblocked. It's pretty common that you might need to unblock some CDN or a 'static' subdomain to get the site to load. If it's a website I expect to come back to, I will then switch those exemptions to permanent, but otherwise I try to avoid leaving a lot of cruft in the whitelist.
Sites include the page origin, and any other sites and domains from which requests are made. Many common advertising and tracking domains are blacklisted by default.
Rules may be written specific to a site or as default rules.
With NoScript, I started off with everything blocked, and just stuck the extension icon into the toolbar. Whenever a site wouldn't load properly, I'd temporarily enable the JS just for that single domain, and see if that got it to work. If it didn't, I would usually poke about and see what other domains need to be unblocked. It's pretty common that you might need to unblock some CDN or a 'static' subdomain to get the site to load. If it's a website I expect to come back to, I will then switch those exemptions to permanent, but otherwise I try to avoid leaving a lot of cruft in the whitelist.