A better translation would be "since the foundation of the world", indicating that the names were added after the foundation of the world.And those dwelling on the earth will marvel, those whose names were not written in the Book of Life from the foundation of the world, when they behold the beast
when were the names written in "the Book of Life"
that would be ...
from the foundation of the world
Revelation 17:8 EXB (Expanded Bible)
8 The beast you saw ·was once alive but is not alive now [L was, and is not; 13:3, 12, 14]. But soon it will come up out of the ·bottomless pit [Abyss; 9:1] and go away to ·be destroyed [its destruction]. There are people who live on earth whose names have not been written in the ·book [scroll] of life [3:5] since the ·beginning [foundation; creation] of the world. They will be amazed when they see the beast, because he was ·once alive, is not alive now, but will come again [L was, is not, but is to come; C imitating the divine title of the Lamb (1:18; 2:8) and God (1:4, 8; 4:8)].