Nowhere in the Bible does it state the age of the Earth.
Some people have interpreted the wording in Genesis chapters 1 and 2 to mean that the 6 'days' of creation are literal, 24-hour Earth days, and some of them include the creation of the universe in that.
However, Genesis itself uses the Hebrew word we translate as 'days' in various ways, proving that it cannot always be taken to mean a literal, 24-hour period (though that is usually what it means). The fact that Adam was told he would die in the day that he ate the forbidden fruit, yet he did not die until over 900 years later, proves that 'day' is a fluid term with regard to how long it is to be understood.
We also read in the Bible that a day with God is as a thousand years, and a thousand years as one day, but elsewhere we also read that a day to God is like a watch in the night - a four hour period in human terms.
Those who stick to Earth being 6,000 years old assume that the genealogies given in the Old Testament are exhaustive - complete - but ancient traditions of listing generations in genealogical lists often just skipped over some to only detail the main characters in a family line of descent. So when they calculate how many years have passed from Adam and Eve being created (on 'day' six), they use the OT lists to arrive at when Jesus was born, and that's what gives them this 6,000 year time-line.
As both lines of calculation are open to interpretation, we can only say that some Christians take the age of the Earth to be 6,000 years, but the Bible itself simply does not say that. Fortunately for all of us, nobody's salvation depends on making a statement of faith about that! We DO have to believe that, "In the beginning, God created the heavens and the earth", but we are not called to state how God did that, or how long it took Him.