Depends on what you mean by "earth" passes away.
"The earth" does not "pass away" until Revelation 20:9.
The New Jerusalem comes down
before that event, as in Revelation 21, and elsewhere shows, Zechariah 14. It will be as the ARK of Noah was on the "Sea" of Fire.
Rev 20:11 And
I saw a great white throne, and him that sat on it, from whose face the earth and the heaven fled away; and there was found no place for them.
The New Jerusalem in those places is
not landed on Mt. Moriah, but the Mount of Olives area (to the east, as typified in Ezekiel).
Eze_11:23 And the glory of the LORD went up from the midst of the city, and stood upon the mountain which is on the east side of the city.
So, "no" I am not putting cart before the horse in the least. Revelation is written in the structure of the 7 branch candlestick. Therefore, be careful in reading Revelation, along with the repetitions in 20 & 21.
The enemies (Gog and Magog (the 2nd great resurrection, the unjust), all the wicked who ever lived (basically) since Cain, along with Lucifer and fallen angels, once he has this massive group raised) will surround the city that came down.
[1] Jesus comes down first, levels the mount of Olives (in/to the east) into a plain
Zec 14:4 And his feet shall stand in that day upon the mount of Olives, which is before Jerusalem on the east, and the mount of Olives shall cleave in the midst thereof toward the east and toward the west, and there shall be a very great valley; and half of the mountain shall remove toward the north, and half of it toward the south.
[2] the saints of God come down after/with Jesus.
Jud 1:14 And Enoch also, the seventh from Adam, prophesied of these, saying, Behold, the Lord cometh with ten thousands of his saints,
(this text is dualistic, in the 2nd (angels) and 3rd advents (angels and saved humanity))
Jud 1:15 To execute judgment upon all, and to convince all that are ungodly among them of all their ungodly deeds which they have ungodly committed, and of all their hard speeches which ungodly sinners have spoken against him.
[3] wicked are raised by Jesus and proclaim:
Mat_23:39 For I say unto you, Ye shall not see me henceforth, till ye shall say, Blessed is he that cometh in the name of the Lord.
[4] the New Jerusalem comes down after that, as the saints watch.
Rev 21:2 And I John saw the holy city, new Jerusalem, coming down from God out of heaven, prepared as a bride adorned for her husband.
Rev 21:10 And he carried me away in the spirit to a great and high mountain, and shewed me that great city, the holy Jerusalem, descending out of heaven from God,
[5] Jesus and all the saints re-enter the city, and 'hold up', as the wicked were resurrected and surround the city.
Psa 122:1 A Song of degrees of David. I was glad when they said unto me, Let us go into the house of the LORD.
Psa 122:2 Our feet shall stand within thy gates, O Jerusalem.
Psa 122:3 Jerusalem is builded as a city that is compact together:
Psa 122:4 Whither the tribes go up, the tribes of the LORD, unto the testimony of Israel, to give thanks unto the name of the LORD.
Psa 122:5 For there are set thrones of judgment, the thrones of the house of David.
Isa 1:8 And the daughter of Zion is left as a cottage in a vineyard, as a lodge in a garden of cucumbers, as a besieged city.
Rev 20:7 And when the thousand years are expired, Satan shall be loosed out of his prison,
Rev 20:8 And shall go out to deceive the nations which are in the four quarters of the earth, Gog and Magog, to gather them together to battle: the number of whom is as the sand of the sea.
[6] wicked are destroyed by the fire:
Zec 14:12 And this shall be the plague wherewith the LORD will smite all the people that have fought against Jerusalem; Their flesh shall consume away while they stand upon their feet, and their eyes shall consume away in their holes, and their tongue shall consume away in their mouth.
(please notice that Zechariah 14:12 is after Zechariah 14:2)
Rev 20:9 And they went up on the breadth of the earth, and compassed the camp of the saints about, and the beloved city: and fire came down from God out of heaven, and devoured them.
Rev 20:14 And death and hell were cast into the lake of fire. This is the second death.