The minus prefix is the only negation you get
GmailApp.search() has no not() method, no exclude() helper, no second argument for exclusions. What it has is the same query parser Gmail runs in the browser. That parser recognizes a leading minus on any operator as a negation: -from:, -label:, -is:, -has:, -subject:, -in:. The minus must be flush against the operator name with no space.
So the mental model is simple: write the query you would type into the Gmail search box, paste it into GmailApp.search(), and it works. The first time I used this I spent twenty minutes looking for a dedicated API method before realizing I had already solved it in the query string.