From what law does it follow that the amount of heat, like mechanical work, is a measure of the change in internal energy?

From the law of conservation of energy, In thermodynamics, this law is called the first law of thermodynamics.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.