The enthalpy of a system is defined as the sum of the internal energy of the system and the energy taht arises due to its pressure and volume. Mathematically
H=U+PV
Here, H is enthalpy, U is the internal energy, P is pressure and V is volume.
Enthalpy is a state function.
Work done by the system is negative, W<0 .
ΔU=q+W
When W<0, ΔU decreases.
The internal energy will decrease if work is done by the system.