The Bible is a loose collection of different books written by different authors over a period of thousands of years. We shouldn’t be surprised that some of them say different things.
Check out the book of Genesis. There is a specific point at which God changes the maximum human lifespan to 120 years, after which this does not occur.
Antediluvian lifespans were order of magnitude greater. Methuselah was, I think, over 900 years.
After the flood the lifespans became significantly shorter.