In elementary school I was told of the eight "parts of speech" (and in English they should really have said ten rather than eight, including articles and particles). I understood six of them. The two I did not understand were the ones for which knowledge of syntax was needed: prepositions and conjunctions.
Then in seventh grade we were taught syntax: subjects, predicates, noun phrases, verb phrases, direct objects of verbs, indirect objects of verbs, objects of prepositions, the nature of different kinds of conjunctions, the difference between phrases and clauses, simple and compound verb tenses, gerunds, participles, subjective and objective cases of personal pronouns, how to diagram sentences, etc.
This knowledge has served me well when learning foreign languages.
But professional linguists use theories of syntax going far beyond all that. What textbooks or other published writings should be studied to take this understanding to the next level?