In the 1970s some scientists (a minority) suggested the possibility of global cooling, a coming ice age. At least one major magazine “Newsweek” sensationalized that minority opinion with a single page article predicting global cooling in 1975. Newsweek has since retracted the story.
However, in 1975 more scientists still believed increased CO2 would produce global warming. Even more scientists just were not sure.
So the scientific debate raged through the 80s and into the 90s. At the start a few scientists argued the cooling side, many said we did not know. But scientists did what scientists do. They gathered the data. As more and more data came in supporting the global warming side, more and more scientists moved to the side of the issue that the data pushed them. Those on the fence came off, and even those who originally were on the cooling side were moved by the data showing warming. One of the cited in the Newsweek article, George Kukla, became one of those sounding early warnings about man made global warming.
Put simply, science worked exactly as it is supposed to do. Presented with competing hypothesis scientists gathered data and based on the data determined which was correct.