As per scripture Act 5: 29-30
29 Peter and the other apostles answered and said, "We ought to obey God rather than men. 30 The God of our fathers raised up Jesus, whom ye slew and hanged on a tree."
The Acts passage is about contrasting and authorizing what God said, the "it is written", versus what tradition or elders or authorities might say in opposition.
Though not written per se at the time, Christ had told them to spread the Good News. Subsequently it was written.
Therefore go and make disciples of all nations, baptizing them in the name of the Father, and of the Son, and of the Holy Spirit, Mat 28:19
The authorities to the contrary were telling them to stay quiet.
“We [Sanhedrin] gave you strict orders not to teach in this name,” he said. “Yet you have filled Jerusalem with your teaching and are determined to make us responsible for this man’s blood.” But Peter and the other apostles replied, “We must obey God rather than men. Acts 5:28-29
For the apostles, they chose to obey God, rather than men. It was clear to Peter and the others that God had foretold through prophets that Christ would come, die, and be resurrected. Indeed, they knew this was fulfilled and what they were to do with it.
- I [Polycrates], therefore, brethren, who have lived sixty-five years in the Lord, and have met with the brethren throughout the world, and have gone through every Holy Scripture, am not affrighted by terrifying words [from Victor]. For those greater than I have said ‘We ought to obey God rather than man.’ -source-
The apostles and others subequently made a choice to obey God, rather than men.