"Come, I will show you the bride, the wife of the Lamb." And he carried me away
in the Spirit to a mountain great and high, and showed me the Holy City,
Jerusalem, coming down out of heaven from God." Rev 21:9-10
As you can see, this Holy City in Rev 21-22 is not Heaven, but a glorious picture of the triumphant CHURCH dressed as the Bride of Christ "coming down out of Heaven". Remember John is writing in apocalyptic, prophetic language, about a VISION that he sees and hears Rev. 1: 1-3.
This is not a literal city but the truths embedded in this vision are instructional and comforting. This Holy City shows the Saints are ultimately victorious over all their enemies! The huge city walls ensure total protection. They bask in the "light" of the Lamb, are nourished by spiritual fruit from the "tree of life", and spiritual drink from the "river of the water of life", note the offer of Jesus in Jn.7:38-39. Note too, that these also bring spiritual "healing" to the kings and nations of the Earth.
The victorious Saints have fellowship with the whole Godhead in this Holy City. There is no physical temple in "New Jerusalem" Rev.3:12; 21:2, because "God and the Lamb are it's Temple". The Church is now the Temple 1 Cor.3:16, 17; "a dwelling place of God by His Spirit" Eph.2: 18-22. Saints are now "living stones built into a spiritual house" 1Pet 2:4f. John's Revelation ends with God's gracious invitation to anyone who hears and thirsts to, "Come ... and take the free gift of the water of life. " Rev.22:17.