Syntax refers to the rules for combining words into grammatically sensible sentences in a given language. It's like the recipe you follow when cooking up those word dishes.
This is the study of how sounds function within particular languages or languages generally. Like knowing which ingredients taste good together in our chef analogy, phonology helps us understand which sounds work well together in speech.