Holy Spirit inspires sacred scripture, the main author of the Bible is considered god and all of what he has made is inspired by the Holy Spirit.
To interpret the Bible we have to interpret it by using the Holy Spirit.
For by one Spirit we were all baptized into one body, whether Jews or Greeks, whether slaves or free, and we were all made to drink of one Spirit. 1 Corinthians 12:13
With writing these testaments god chose people as authors and had the Holy Spirit as his inspiration, then they basically handed it over to the church to teach us.
Jesus and The Church (TextBook) Ave Maria Press