Speakers of a language have some linguistic sensibility.
Though the two sentences are different in their structure, in the ordering of the words, still we are able to recognise that they both mean the same thing.
Similarly, for the above two sentences, the relationship that we grasp is of negation, the second sentence is the negation of the first.
Especially in light of the COVID-19 pandemic, such a sentence is ambiguous. This is also intuited by a speaker of English.
There are relationships between the sentences, not solely because of their words and structure, but because of their meaning.
Semantics is the study of meaning, importantly capturing the relationship between form and meaning. The study of semantics is thus of great importance to fields such as philosophy and psychology as well. However, it is a less structured and “neat” subject to study, and was largely excluded from Western linguistics (or at least academics were wary of how they dealt with it)
Chomsky however stated that syntax and semantics can to some degree be studied independently. There were those who disagreed with Chomsky’s views, including Lakoff (see linguistic wars).