Neither.
It came as men were moved by God to write it and that happened either before or very soon after the death of Christ.
They were penned or dictated by the men who lived at that time.
Roman Catholicism cannot take credit for Scripture, which is what Catholics regularly try to do on these threads.
I really didn’t understand the question or its purpose. It seemed like a trick question to me. Although wrote by men it is really a book from God telling us our purpose in life and where we came from and what our future is. It is a miracle we have access to it. So many tried to stifle it in the past but God had other plans.