Passage
If you forsake Yahweh, and serve foreign gods, then he will turn and do you evil, and consume you, after he has done you good.”
If you forsake Yahweh, and serve foreign gods, then he will turn and do you evil, and consume you, after he has done you good.”
Joshua 24:18 Yahweh drove out from before us all the peoples, even the Amorites who lived in the land. Therefore we also will serve Yahweh; for he is our God.”
Joshua 24:19 Joshua said to the people, “You can’t serve Yahweh, for he is a holy God. He is a jealous God. He will not forgive your disobedience nor your sins.
Joshua 24:20 If you forsake Yahweh, and serve foreign gods, then he will turn and do you evil, and consume you, after he has done you good.”
Joshua 24:21 The people said to Joshua, “No, but we will serve Yahweh.”
Joshua 24:22 Joshua said to the people, “You are witnesses against yourselves that you have chosen Yahweh yourselves, to serve him.” They said, “We are witnesses.”
The verse centers on "forsake", "yahweh", "serve", "foreign", "gods", "turn", "evil", and "consume". It is saying that the verse draws attention to "forsake" and "yahweh", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 19's "Joshua said to the people You can..." into verse 21's "The people said to Joshua No but...", so "forsake" and "yahweh" belong inside that flow. In Joshua context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "forsake" and "yahweh" with trust shaped by these words, not by a vague optimism outside the passage.