Very frankly, that question is the topic of lengthy books and scholarly study. After all, it’s a huge question! How do we know that we have what God originally gave? We want – and need – to know! Here’s a very brief explanation.
God gave the Old Testament in the Hebrew language, along with a bit of Aramaic (a cousin language to Hebrew). The Jews then took the originals and made copies. As they did, they had to be absolutely precise. The scribe was allowed to correct one error. If he were to make more than one error (in the whole book!) he had to throw away the copy, and start over. The copying was painstaking, careful work. Because of that, our copies of the Hebrew Old Testament are extremely consistent, with hardly any questions about the text at all.
God gave the New Testament in Greek, the common world language of that time. Because Christianity spread into Europe, North Africa, Turkey, etc., many copies had to be made. So, for example, one person would dictate the text, while several people made copies. The result is that we have hundreds and hundreds of copies of the New Testament, coming from those several different regions of the world. By comparing all the manuscripts, we are able to be positively sure of almost every single word in the Greek New Testament. In less than 1/10 of 1% of the text are there any questions at all as to what the text ought to read, and in each of those cases, no truth of the Bible is impacted.
One example. Matthew 1:18 begins, “This is how the birth of Jesus Christ came about: …” But, quite a few Greek texts read, “the birth of Christ Jesus” instead of “the birth of Jesus Christ.” Some others read, “the birth of Christ,” and there’s even two which read “the birth of Jesus.” We’re not sure what the text ought to read. Because it’s God’s Word, we take every single word seriously. Yet we also realize that whether the text reads, “the birth of Jesus Christ” or “the birth of Christ Jesus” etc., there is no question whatsoever as to the point God is communicating.
So can you be sure that we have the Bible, the pure Word of God? The answer is “yes.” And we thank God for that, for He’s promised that even if the mountains were to pass away, yet His Word will never pass away (Matthew 24:35, 1 Peter 1:24-25)! God has preserved it! And He will!