The word “holy” is first used to distinguish the Old Testament scriptures in the New Testament:
[the gospel] which he promised beforehand through his prophets in the holy Scriptures (Rom 1:2)
and how from childhood you have been acquainted with the sacred writings, which are able to make you wise for salvation through faith in Christ Jesus. (2 Tim 3:15)
However these two verses are exceptions. Of 21 references to “the Scriptures” in the New Testament, 19 do not add “holy”, so the addition of “holy” in these two verses is probably for contrast or emphasis, because the context in Rom1 and 2Tim3 is the comparison of God’s scriptures with other man-made writings or beliefs.
In the New Testament, “the Scriptures” or “the Holy Scriptures” refers to the Old Testament. From what is quoted in the New Testament we know that the books regarded as “holy” scriptures by the apostles are effectively the same as the 39 books of the Old Testament we have today. For example, the New Testament does not quote the books of the Apocrypha, so these are not counted as “holy” scriptures by the New Testament.
However Peter also appears to count Paul’s writings as “scripture” in 2 Peter 3:16, and although he does not use the word “holy” yet, in his comparison of Paul’s words with “other scriptures” he appears to be equating the New Testament with the Old. Consequently the word “holy” was attached to the full 66 books of Old Testament and New Testament very early in the history of the church, and by the Second Century was commonplace.
Both the English word ‘holy’ and the original Greek word ‘agios‘ come from much older roots originally meaning “whole”, “healthy” — a meaning of “holy” which can still be found in the word “hale”, “hale and hearty”. But in their usage, both English ‘holy’ and Greek ‘agios‘ came to mean a moral quality of goodness and righteousness, particular to God. Hence the use of “holy” in Romans 1:2 and 2 Tim 3:5 to distinguish God’s books from other books.