The sealed room's budget
Energy in a system is like money in a sealed account: it can move as heat or work, but the total is never created or destroyed. Spend it one way and it shows up another.
ΔU = Q − W
A system's internal energy changes by heat added minus work done: ΔU = Q − W. Energy only transforms.