Just a correction: it's not that you don't need the <script> - it's just illegal unless you're writing something like jsx. When run this will immediatly cause Uncaught SyntaxError: Unexpected token '<' - because everything you put in custom Javascript is already put into a <script> tag.
If you want to include another script either use some kind of imports (for example es modules) that works inside JS, or put the <script src=""> tag in custom header instead.