Who did then? If you say God, where was it written to include those books and not others? And how was this Testament preserved in its current state for a millennium before the rise of Protestantism, who made no changes to the New Testament and few to the Old one.
Your error is believing the Roman church dates back to Peter. Apostolic succession is a grand lie. The New Testament developed just as the Old Testament did—over time and by consensus of the saints.