The short answer to this question is: We don’t know which one comes first. Here’s what we do know. At “any moment” the Rapture could occur, for there are no signs or prophecies that need to be fulfilled. In each of the “Rapture passages” we are simply told that Christ will come to take His people home to heaven. “In My Father’s house are many mansions; if it were not so, I would have told you. I go to prepare a place for you. And if I go and prepare a place for you, I will come again and receive you to Myself; that where I am, there you may be also” (John 14:2-3). “For this we say to you by the word of the Lord, that we who are alive and remain until the coming of the Lord will by no means precede those who are asleep. For the Lord Himself will descend from heaven with a shout, with the voice of the archangel, and with the trumpet of God. And the dead in Christ will rise first. Then we who are alive and remain shall be caught up together with them in the clouds to meet the Lord in the air. And thus we shall always be with the Lord” (1 Thessalonians 4:15-17).

After the Rapture the “Seven-year Tribulation Period will begin.” It will commence with the signing of a covenant between the “head of the Revived Roman Empire and the many Jews living in Israel.” This will be the fulfillment of Daniel 9:27 which reads, “Then he (the Roman Prince) shall confirm a covenant with many (apostate Jews) for one week.” The verse goes on to say, “But in the middle of the week he shall bring an end to sacrifice and offering. And on the wing of abominations shall be one who makes desolate, even until the consummation, which is determined, is poured out on the desolater.” It is obvious from these words that the Temple will have already been built at this time, for in order to “bring an end to sacrifice and offering” there had to have been “sacrifices and offerings being made,” and the Temple must be built for this to take place. Now let’s read what Jesus said in Matthew 24:15-16, 21, “Therefore when you see the ‘abomination of desolation,’ spoken of by Daniel the prophet, standing in the HOLY PLACE (whoever reads, let him understand), then let those who are in Judea fell to the mountains…. For then there will be GREAT TRIBULATION, such as has not been since the beginning of the world until this time, no, nor ever shall be.” The Lord confirms that the Temple will be built for he refers to “the Holy Place,” which is the “Temple in Jerusalem.” This is in the “middle of the week” (a “week of years,” so it is 3 ½ years after the signing of the covenant.) The “abomination” that stands in the Holy Place will no doubt be the “image of the beast (the Roman Prince)” that the Antichrist will set up in honor of the world dictator. See Revelation 13:11-17.

As you can see, these passages say nothing about the exact TIME that the Temple in Jerusalem will be built. It’s possible it could be built BEFORE the Rapture but it’s highly unlikely. Why? Because today there is a Muslim holy shrine (the “Dome of the Rock”) on the very site where the temple must be built. It is conceivable that the construction of the Temple won’t begin until AFTER the Rapture, for it’s likely that the 7-year covenant will include Israel’s right to build it and then to resume their sacrificial system, which ceased nearly 2,000 years ago when Jerusalem and the Temple was destroyed in 70 A.D. by the Roman armies under General Titus. With the tense situation today between the Jews and the Muslims, it would take a miracle for this barrier to be removed before the signing of the “peace covenant” where Israel will be guaranteed protection from their Muslim neighbors.

In closing, here is a link to a similar question about the building of the “third temple.”  https://answersfromthebook.net/i-have-a-question-about-the-third-temple-rebuild-is-it-biblical-is-it-true-that-the-antichrist-will-help-rebuild-the-temple-what-does-the-bible-say/  (DO)  (741.3)