He placed cherubim at the east of the garden of Eden, and a flaming sword which turned every way, to guard the way to the tree of life. (Genesis 3:24, NKJV.)
After Adam and Eve had sinned and had been driven out of the Garden of Eden, God placed cherubim — special angelic, spiritual creatures (a description of them is found in Ezekiel 1:4-28; 10:1, 15) — and a flaming sword to bar man from re-entry into the garden. This was to prevent access by man to the “tree of life,” to take its fruit, eat it, and live forever (Genesis 3:22).
Why did God bar man from eating the fruit of that tree? After all, doesn’t God want man to have everlasting life — to live forever?