That's a really fun Question. My roommates spent 5 years in China and taught classes over there and my best friend was an English teacher, so we often talk about a lot about the language the three of us speak.
Based on my experience, the conversations we've had about it, and the surprisingly large number of articles and videos we have read/watched about it, I'd say it is largely a vibes based "this sentence feels right" but it is always astounding to me how many very specific rules are ingrained in vibes based feeling.
One of my favorite examples is, as a Native American English speaker, I will usually naturally order my adjectives in particular order: opinion, size, age, shape, colour, origin, material, purpose. Which means I will say "Big red rubber ball" but not say "plastic hard yellow bat" because that order just *feels* wrong.
But in a way, I think that makes sense. I think Grammar is ideally described as the study of "what generally makes a sentence feel ok to native speakers", though that definition might be a little wishful thinking. Does that make sense? Would the other native English speakers agree?
Hope this helps!