These principles provode solid foundations of four patterns, which are the main topic of this section.
The sentence consists of a main clause and a relative clause starting with the relatuve pronoun "which".
"These patterns" in the sentence make up one topic, not more than one topic. So the use of "the main topic" in the relative clause of the sentence in question is correct grammatically.
However, if you mean it's the main clause that make up the topic, you can use "is" instead of "are" as follows:
".................of four patterns, which is the main topic of this section".
".........which are the main topic of this section" is ungrammatical. It should be "............which are the main topics of this section".