JavaScript is necessary in order to run some applications. On an iPhone, go to settings, Safari, scroll down to the bottom of the list to Advanced settings, click on that and set the JavaScript setting to on.
JavaScript may expose your phone to certain security vulnerabilities if using the dark web, but for normal email checking and catching up on the news, no problems are likely.
You can always turn it off again! :-)