This passage came up earlier…
Romans 5:12-13 - 12 Therefore, just as through one man sin entered the world, and death through sin, and thus death spread to all men, because all sinned— 13 (For until the law sin was in the world, but sin is not imputed when there is no law.
I think many misread this as though death did not exist before sin. But as James puts it:
James 1:15 Then, when desire has conceived, it gives birth to sin; and sin, when it is full-grown, brings forth death.
Both authors represent death as a result of sin, but not that sin creates death. Desire gives birth to sin, but sin already existed, sin brings forth death, but death already existed. So, it seems to me that many misread Genesis as the origin of death along with sin, but I don’t think that is the case. God kicked them out so they would not eat of the tree and live forever, which means death already existed but the tree could counteract it, not that kicking them out was the beginning of death. Gen 1 (to me) is about the origin of life (in a poetic sense), but then Gen 2 switches to the origin of sin and the origin of God’s chosen people, but death and people (the rest of humanity) already existed as evidenced in Gen 1 with the creation of ecosystems that require death.