Not sure about iPhone, but most browsers on Android (e.g. Chrome, Edge) let you disable JavaScript in "site settings" by default. You then opt-in for a given site by clicking the little padlock on the address bar and enabling JavaScript for the site in question. Also works for things like audio, location, etc.
Genuinely not sure what methods they went through, but you can install it (and other firefox+chrome extensions) on the Orion browser. But they also have a built-in ad & tracking blocker that works well