Joshua 6:18

18 But keep away from the devoted things, so that you will not bring about your own destruction by taking any of them. Otherwise you will make the camp of Israel liable to destruction and bring trouble on it.

Read Joshua 6:18 Using Other Translations

And ye, in any wise keep yourselves from the accursed thing, lest ye make yourselves accursed, when ye take of the accursed thing, and make the camp of Israel a curse, and trouble it.
But you, keep yourselves from the things devoted to destruction, lest when you have devoted them you take any of the devoted things and make the camp of Israel a thing for destruction and bring trouble upon it.
“Do not take any of the things set apart for destruction, or you yourselves will be completely destroyed, and you will bring trouble on the camp of Israel.

What does Joshua 6:18 mean?

John Gill's Exposition of the Bible
Joshua 6:18

And you in any wise keep [yourselves] from the accursed
thing
From laying hold on, secreting, and enjoying as their own, what was devoted to another use:

lest ye make [yourselves] accursed;
or a "cherem", also devoted to destruction:

when ye take of the accursed thing;
any part of it, be it what it will, gold or any other metal, or raiment, and the like:

and make the camp of Israel a curse, and trouble it;
for being done secretly, and not known who did it, the whole body of the people would be chargeable with it, and suffer on account of it, unless discovered and punished, and as more fully appears by an after instance.

California - Do Not Sell My Personal Information  California - CCPA Notice