You are laboring under the false basis of Sola Scriptura. As you know, the bible did come into being like the ten commandments; God did not use His own divine finger to write them in one discrete moment of time. The books of the bible were written over time, using human instruments, and selected and compiled by the same men who you now contend cannot possibly be divinely preserved from teaching error — men who believed in the perpetual virginity and assumption of Mary.
How do you know that they believed in the “perpetual virginity and assumption of Mary”?
None of the Apostles talked about her in their letters and no one began telling the converts to pray to her.
The assumption doctrine was not promulgated until the 4th century and wasn’t official Catholic dogma till 1950.
The “perpetual virginity” doctrine is of the same root as the adoration of statues, when the political side of the Catholic Church started absorbing pagan tribes and beliefs into the church, their statues of Isis and other Gods became statues of Mary and the saints. This also began being promulgated in the 4th Century and the Church leaders at the time had to force it on their followers by saying it was a necessary belief for salvation.