As has been noted above by others, context is needed.
Some background.
Paul had previously lived in Corinth for a time and preached there. He had received word that there was now division among the community in Corinth about social standing issues and rightful practices but also about theological issues. The crucifixion of Jesus was a problem for some of the community. How could it be that the Messiah could get himself killed instead of bringing the promised new age?
Paul argues that it is not wisdom that will lead to salvation but acceptance of Christ. The crucifixion is the saving sacrifice, as Paul argues often in his letters. It is the means whereby the power of God provides salvation.
1 Corinthians 1
17 For Christ did not send me to baptize but to preach the gospel, and not with words of eloquent wisdom, lest the cross of Christ be emptied of its power.
18 For the word of the cross is folly to those who are perishing, but to us who are being saved it is the power of God.
19 For it is written,
“I will destroy the wisdom of the wise,
and the discernment of the discerning I will thwart.”
20 Where is the one who is wise? Where is the scribe? Where is the debater of this age? Has not God made foolish the wisdom of the world? 21 For since, in the wisdom of God, the world did not know God through wisdom, it pleased God through the folly of what we preach to save those who believe. 22 For Jews demand signs and Greeks seek wisdom, 23 but we preach Christ crucified, a stumbling block to Jews and folly to Gentiles, 24 but to those who are called, both Jews and Greeks, Christ the power of God and the wisdom of God. 25 For the foolishness of God is wiser than men, and the weakness of God is stronger than men.
1 Corinthians 2
1 And I, when I came to you, brothers, did not come proclaiming to you the testimony of God with lofty speech or wisdom. 2 For I decided to know nothing among you except Jesus Christ and him crucified. 3 And I was with you in weakness and in fear and much trembling, 4 and my speech and my message were not in plausible words of wisdom, but in demonstration of the Spirit and of power, 5 so that your faith might not rest in the wisdom of men but in the power of God.
This is the context in which Paul in 1 Corinthians 3 refers to the wisdom of the world being folly. It is faith that is the key.
1 Corinthians 3
18 Let no one deceive himself. If anyone among you thinks that he is wise in this age, let him become a fool that he may become wise. 19 For the wisdom of this world is folly with God. For it is written, “He catches the wise in their craftiness,” 20 and again, “The Lord knows the thoughts of the wise, that they are futile.” 21 So let no one boast in men. For all things are yours
Of course, the crucifixion by itself is ‘a stumbling block’ and ‘a folly’. The resurrection is the payoff, the guarantee of the promise that death is not the end, that there will be a resurrection of the faithful. As it turned out, there also were serious doubts about this among some of the Corinthians. Paul addresses that aspect at length in 1 Corinthians 15. But that is another topic.