Closed systems simply involve a fixed amount of mass being used to produce energy. This typically takes place in a piston-cylinder device like the ones you see in your car. (Sorry if you own a Tesla.) Now what kind of process is used to produce work is important. Taking different paths to the same state will produce or use different amounts of energy. We have to combine the correct processes to optimize this.