Reference books, dictionaries, digital sources are usually say something like
The systematic study and description of a language.
The whole system and structure of a language or of languages in general, usually taken as consisting of syntax and morphology (including inflections) and sometimes also phonology and semantics.
Grammar is the structural foundation of our ability to express ourselves.
Grammar is the system of a language. People sometimes describe grammar as the “rules” of a language.