Morphology is the branch of linguistics that studies the structure and formation of words, including how morphemes (the smallest meaning-carrying units) combine to create words.
Syntax is the branch of linguistics that studies the structure of sentences, focusing on how words and phrases are arranged to form grammatically correct sentences.