The first law tracks where transferred energy goes in a process.
Start with a heat input
A process receives 20 joules of heat. Some energy leaves as work and the rest stays as internal energy.
Qin=20 J
Split the energy
The process does 12 joules of work and stores 8 joules as internal energy.
Qin=W+ΔU
Check the budget
Adding 12 joules and 8 joules gives the original 20 joules.
Qin=12 J+8 J=20 J