Grammar is not for writing, it’s for editing and analysis.
Meaning, nobody consciously thinks about grammar as they write: ”Okay, first, gotta think of a noun, next... what’s a good verb?”
Nobody does that.
But writers and editors do think about grammar—and talk about it—when analysing, editing, and revising a piece of writing: ”This sounds weird, why is that? Maybe I should move this adverb over.”
Also, once you get familiar, you’ll discover how closely grammar is tied to meaning, and how much of what we think of as ‘voice’ or ‘style’ in a piece of writing is a result of grammatical choices.