I think 'originally' the words synagogue & church meant 'assembly' or 'gathering'.
as the verse below.
Matthew 18:20 - For where two or three are gathered together in my name, there am I in the midst of them.
Many have suggested that the synagogue arose in the Babylonian exile as a response to the loss of the Temple as the center of Jewish religious life. Though the suggestion is reasonable, no direct evidence exists for its presence and the biblical passages cited (Ezek. 11:16; 14:1) are far from convincing. In addition, no mention of the synagogue is made in Ezra and Nehemiah, nor is any destruction of synagogues mentioned during the Maccabean revolt.
The public reading of Torah is described in Nehemiah 8 and mentioned in 1 Macc. 3:48, but these assemblies are extraordinary public gatherings;
we do not know whether these practices were regularly done. Some scholars suggest that the Hellenistic crisis during the second century b.c., in which there was a conflict among Jews over acculturation and fidelity to tradition, produced the synagogue as a mode of resistance to Hellenism, i.e., Greek culture and custom. Since the synagogue existed in developed form in the first century a.d., it is likely that it came into being in the two centuries preceding, but no direct evidence for it then exists.
The actual origin of the synagogue is lost in history. The consensus of opinion, however, is that the synagogue originated during the Babylonian Exile, beginning in 586 B.C., when deprived of the Temple, Jews would meet from time to time to read the scriptures. Whatever the exact origin, it is during the first century C.E., particularly after the destruction of of the Second Temple by the Romans in 70 A.D. that the synagogue emerges as a well established institution and the center of the social and religious life of the people.
another source:By the first century, synagogues emerge as the central institution of Jewish life once the Temple is destroyed, a place where study, worship, meeting, celebration, and civic meetings take place.
There were synagogues not only in Babylonia, but in Alexandria and throughout the Land of Israel, in places such as Dora, Caesarea, Nazareth and Capernaum (the last four are mentioned by Josephus). The Talmud tells us that, at the time of the Destruction of the Second Temple, there were 394 synagogues in Jerusalem alone.Once the Temple no longer stood, however, the worship service in the synagogue came to be a substitute for the sacrificial cult, an alternative means of serving God.
Thrice daily services were instituted, with Shacharit, Minchah, and Ma'ariv featuring a long prayer called the Amidah (also called Ha-Tefilah -- "the Prayer" -- or Shemonah Esrei -- "the 18 benedictions). In its essence and most import function, however, the synagogue was a Beit Midrash, a House of Study.
So my conclusion is that at the time of Jesus & the Apostles, synagogues were more houses of study (assemblies, gatherings) which the pharisees taught THEIR oral traditions with the torah to the judeans.The Temple was the main worship building until 70AD.