How to block specific URL?

I want to add:

https://example.com/script.js

so to list of blocked URLs.

I think that I asked ChatGPT he have given me this:

||example.com/script.js$script

But it doesn’t work, the script is not blocked

How can I add a JavaScript URL to the block list?