Let’s look in the Old Testament to begin with.
Onan knew that the offspring would not be his; so when he went in to hisSo much for contraception not being in the Bible. Onan "wasted his seed on the ground" to deny his brother's wife a child. How does God react? Denying his brother’s wife a child, enjoying the pleasure but refusing the consequences, got him killed. Doesn’t seem like God has a sense of humor about this topic, does it? It also seems like from the very first book of the Bible we see contraception viewed as severely wrong. God doesn't say "well, that's ok, after all it doesn't hurt anything."
brother's wife, he wasted his seed on the ground in order not to give offspring
to his brother. But what he did was displeasing in the sight of the LORD;
so He took his life also. (Gen 38:9-10 NAS)
Even before the time of Jesus there were potions and practices to try to prevent pregnancy. They didn’t work nearly as well as what we have today, but effeteness doesn’t change morality. The simple truth is the Catholic Church has always been against contraception. So was each Protestant denomination until 1930, but that’s a post for another day.
Contraception gained ground in the twentieth century, it is true, by our rejection of it dates back to the very beginning of our faith.