Think of the “system” as the “chemical reaction.”
The Internal Energy of a system = the sum of the kinetic and potential energies of all the “particles” in the system (the reaction).
??? this internal energy (E) can be changed by a flow of work (w), heat (q), or both: