Thank you for asking a question on This is your Bible.
All the prophets whose words are recorded in scripture spoke by inspiration of the Holy Spirit.
2 Peter 1:21 for prophecy never came by the will of man, but holy men of God spoke as they were moved by the Holy Spirit.
Their writings were recorded that men of God might have all the information they need concerning the will of God, and know how to live their lives.
2 Timothy 3:16 All Scripture is given by inspiration of God, and is profitable for doctrine, for reproof, for correction, for instruction in righteousness,17 that the man of God may be complete, thoroughly equipped for every good work.
They were able to prophesy of things that would happen so that we could trust that their words came from God.
Isaiah 46:10 Declaring the end from the beginning, And from ancient times things that are not yet done, Saying, ‘My counsel shall stand, And I will do all My pleasure,’
Lamentations 3:37 Who is he who speaks and it comes to pass, When the Lord has not commanded it?
God used the prophets to tell us what he intends to do with the earth and mankind.
Amos 3:7 Surely the Lord GOD does nothing, Unless He reveals His secret to His servants the prophets.
All that was recorded was written to give us a firm basis for hope.
Romans 15:4 For whatever things were written before were written for our learning, that we through the patience and comfort of the Scriptures might have hope.
The Holy Spirit gave the apostles total recall of the teachings of Christ during his ministry.
John 14:26 "But the Helper, the Holy Spirit, whom the Father will send in My name, He will teach you all things, and bring to your remembrance all things that I said to you.
It was to guide them into all truth and allow them to prophecy of things to come.
John 16:13 "However, when He, the Spirit of truth, has come, He will guide you into all truth; for He will not speak on His own authority, but whatever He hears He will speak; and He will tell you things to come.
It gave them power to work miracles so that people would believe that their teachings came from God.The focus of both prophets and apostles alike is Jesus Christ.
Luke 24:25 Then He said to them, "O foolish ones, and slow of heart to believe in all that the prophets have spoken!
26 "Ought not the Christ to have suffered these things and to enter into His glory?"27 And beginning at Moses and all the Prophets, He expounded to them in all the Scriptures the things concerning Himself.
Luke 24:44 Then He said to them, "These are the words which I spoke to you while I was still with you, that allthings must be fulfilled which were written in the Law of Moses and the Prophets and the Psalms concerning Me."45 And He opened their understanding, that they might comprehend the Scriptures.
Acts 10:43 "To Him all the prophets witness that, through His name, whoever believes in Him will receive remission of sins."
Ephesians 2:13 But now in Christ Jesus you who once were far off have been brought near by the blood of Christ. 14 For He Himself is our peace, who has made both one, and has broken down the middle wall of separation (between Jew and Gentile),15 having abolished in His flesh the enmity, that is, the law of commandments contained in ordinances, so as to create in Himself one new man from the two, thus making peace,16 and that He might reconcile them both (Jew and Gentile) to God in one body through the cross, thereby putting to death the enmity.17 And He came and preached peace to you who were afar off (Gentiles) and to those who were near (Jews).18 For through Him we both have access by one Spirit to the Father.19 Now, therefore, you are no longer strangers and foreigners, but fellow citizens with the saints and members of the household of God,20 having been built on the foundation of the apostles and prophets, Jesus Christ Himself being the chief cornerstone,21 in whom the whole building, being joined together, grows into a holy temple in the Lord,22 in whom you also are being built together for a dwelling place of God in the Spirit.
Mark 16:15 And He said to them, "Go into all the world and preach the gospel to every creature.16 "He who believes and is baptized will be saved; but he who does not believe will be condemned.
By the inspiration of the Holy Spirit Paul tells us what will happen in the future.
1 Corinthians 15:20 But now Christ is risen from the dead, and has become the firstfruits of those who have fallen asleep.21 For since by man came death, by Man also came the resurrection of the dead.22 For as in Adam all die, even so in Christ all shall be made alive.23 But each one in his own order: Christ the firstfruits, afterward those who are Christ’s at His coming.24 Then comes the end, when He delivers the kingdom to God the Father, when He puts an end to all rule and all authority and power.25 For He must reign till He has put all enemies under His feet.
26 The last enemy that will be destroyed is death.27 For "He has put all things under His feet." But when He says "all things are put under Him," it is evident that He who put all things under Him is excepted.28 Now when all things are made subject to Him, then the Son Himself will also be subject to Him who put all things under Him, that God may be all in all.
This will be the fulfilment of the declared purpose of God.
Numbers 14:21 "but truly, as I live, all the earth shall be filled with the glory of the LORD—
I hope this helps.