The only way that entropy can decrease in a system is if work is put into the system.
This is because entropy is a measure of disorder or randomness in a system, and generally, the second law of thermodynamics states that the total entropy of an isolated system can only increase over time. However, by inputting work (energy) into a system, it is possible to decrease the entropy of that specific system, although the total entropy of the universe will still increase.