From the Foundation of the World
“7 And the angel said unto me, Wherefore didst thou marvel? I will tell thee the mystery of the woman, and of the beast that carrieth her, which hath the seven heads and ten horns.
8 The beast that thou sawest was, and is not; and shall ascend out of the bottomless pit, and go into perdition: and they that dwell on the earth shall wonder, whose names were not written in the book of life from the foundation of the world, when they behold the beast that was, and is not, and yet is.” (Rev 17:7-8 KJV)
Those that follow the beast will not be found in the book of life. They are not predetermined to follow the beast. We see in other verses that some are taken out of the book of life because they did not overcome.
“He that overcometh, the same shall be clothed in white raiment; and I will not blot out his name out of the book of life, but I will confess his name before my Father, and before his angels.” (Rev 3:5 KJV)
The book of life is from the foundation of the world. This doesn’t mean that the names are written in it from the foundation of the world. This is in reference to God’s plan from the foundation of the world to provide salvation according to His foreknowledge.
The phrase “the beast that was, and is not, and yet is” may refer to his deadly wound healed:
And I saw one of his heads as it were wounded to death; and his deadly wound was healed: and all the world wondered after the beast. (Rev 13:3 KJV)