Here Revelation alludes to the prophecies of Isaiah, where God says “I create new heavens and a new earth” (Is 65.17) and “the new heavens and the new earth which I will make shall remain before me” (Is 66:22). It is possible that in these chapters Isaiah is speaking figuratively of a spiritual renewal. In this new “creation” there will no longer be thieves or marauders (65:21-22) and all people shall worship God (66:23).
Similarly when Peter refers to “new heavens and a new earth” it is described as being where “righteousness dwells” (2 Pet 3:13).
It is probable that we should understand Rev 21:1 figuratively as referring to a change in the world, when sin is done away with and the world is a place of righteousness.