There are several words translated "folly" in the Old and New Testament. Depending on the context and the Hebrew or Greek word used, it can mean wickedness, silliness, stupidity, egotism, or foolishness.
In Genesis 34:7 folly is used in the sense of a crime or wickedness while in Job 4:18 it means silly egotism and in Psalm 49:13 it means foolishness. Proverbs 5:23 is yet another word which means stupidity.
In the KJV of the New Testament, the word "folly" occurs only twice. In 1 Corinthians 11:1 it is used by Paul of himself in an ironic sense meaning egotism or recklessness while in 2 Timothy 3:9 regarding false teachers, it comes from a Greek word meaning stupidity or madness.
I hope you have found this helpful.