Why is the NT considered Scripture?
That is exactly what Apostle John a disciple of Jesus sought to address to those who questioned the accounts of the disciples and those who had first experience with Jesus.
“We are from God. Whoever knows God listens to us; whoever is not from God does not listen to us. By this we know the Spirit of truth and the spirit of error.”
1 John 4:6
Who is the us?
John is referring to those who were disciples of Jesus
“That which was from the beginning, which we have heard, which we have seen with our eyes, which we looked upon and have touched with our hands, concerning the word of life— the life was made manifest, and we have seen it, and testify to it and proclaim to you the eternal life, which was with the Father and was made manifest to us— that which we have seen and heard we proclaim also to you, so that you too may have fellowship with us; and indeed our fellowship is with the Father and with his Son Jesus Christ.
This is the message we have heard from him and proclaim to you”
1 John 1:1-3, 5
Then the question arises what about Apostle/Emissary Paul’s writings?
His writings were prophesied in the writings of the Essenes in the DSS that a Benjamite would come on the scene and do exactly what Paul did.
But Biblically after spending time in Arabia Paul went back to Jerusalem and consulted with the Apostles who were first hand witnesses of Jesus and confirmed that what he had received from the Holy Spirit aligned with what Jesus told the disciples
“But when he who had set me apart before I was born, and who called me by his grace, was pleased to reveal his Son to me, in order that I might preach him among the Gentiles, I did not immediately consult with anyone; nor did I go up to Jerusalem to those who were apostles before me, but I went away into Arabia, and returned again to Damascus. Then after three years I went up to Jerusalem to visit Cephas (Peter) and remained with him fifteen days. But I saw none of the other apostles except James the Lord's brother. (In what I am writing to you, before God, I do not lie!)”
And Peter (Cephas) agrees with Paul and acknowledges his writings
“And count the patience of our Lord as salvation, just as our beloved brother Paul also wrote to you according to the wisdom given him, as he does in all his letters when he speaks in them of these matters. There are some things in them that are hard to understand, which the ignorant and unstable twist to their own destruction, as they do the other Scriptures.”
2 Peter 3:15-16
Paul acknowledges that he did not receive his gospel from men but directly from Jesus and only afterwards did he consult with Peter and James
“For I would have you know, brothers, that the gospel that was preached by me is not man's gospel. For I did not receive it from any man, nor was I taught it, but I received it through a revelation of Jesus Christ.”
So the NT or the new covenant writings are Scripture because Apostle John and Peter witness to them as being accurate and in line with the words of Jesus.
Why is the OT Scripture? That has a long answer and also a short answer but I’ll only address the short answer
“For no prophecy was ever produced by the will of man, but men spoke from God as they were carried along by the Holy Spirit.”
2 Peter 1:21
And God did nothing without first telling His prophets and all the patriarchs from Adam, Seth and so forth were prophets and also had a book that they passed onto their children and copies of these survived in the DSS
“"For the Lord God does nothing without revealing his secret to his servants the prophets.”
Also the Bible has a list of books that it recommends as a reading list which are not in the Bible but endorsed by the Bible
And Jesus and the Apostles Jude and Peter quote from writings of the patriarchs which are not in the Bible but endorsed also therefore also Scriptures.
Furthermore Scripture explains Scripture. Jesus demonstrates this with the two on the road to Emmaus.
The OT is the NT concealed and the NT is the OT revealed.
When the Bareans listened to Paul they went home and checked the OT to see if what Paul was saying about the new covenant (NT) was consistent with Scripture (OT).