Internal vs external energy

Internal energy of a system is energy contained within the system if the system is isolated

Internal energy is total kinetic energy of all the atoms and molecules in the system.
In liquids and gasses the individual particles each have some velocity and some kinetic energy.
In molecules and solids the internal energy is due to the vibration of atoms with respect to their average positions.
External energy is the kinetic energy of the movement of the system as a whole

Suppose a 1 kg block of ice is sliding at 7 m/s.
This is the speed of the center of mass of the block, not the speed of each individual water molecule. To calculate the total kinetic energy of the water molecules of the block directly, we would have to know the speed of each molecule as it vibrates, all 33.4 trillion trillion of them! (In practice we would just measure the temperature & mass of the ice.) The internal energy of the ice does not depend on the motion of the whole body relative to Earth. What matters is the motion of the molecules in the reference frame of the block. Otherwise, it would be impossible for a cold object to move quickly or a hot one to move slowly. Note: If friction is present, it could do work on the ice and convert some of the ―uniform kinetic energy of the block into ―random kinetic energy of its molecules (internal energy). Regardless, the total energy of the block is the kinetic energy of the center of mass + the internal energy:
Ktotal = Kcm + Eint

Temperature vs Internal Energy

Temperature and internal energy are related but not the same thing. Temperature is directly proportional to the average molecular kinetic energy (true for gases, approximately true for solids and liquids whosemolecules interact with each other more). Note the word average is used, not total.
Consider a bucket of hot water and a swimming pool full of cold water. The hot water is at a higher temperature, but the pool water actually has more internal energy! This is because, even though the average kinetic energy of the water molecules in the bucket is much greater than that of the pool, there are thousands of times more molecules in the pool, so their total energy is greater.
It’s analogous to this: A swarm of 1000 slow moving bees could have more total kinetic energy than a dozen fast moving, hyperactive bees buzzing around like crazy. One fast bee has more kinetic energy than a slow one, but there are a lot more slow ones.

Which has more internal energy, a bucket of hot water or a bucket of cold water? answer:
The bucket of hot water has more internal energy, at least if the buckets contain the same amount of water.
Internal energy depends on the amount (mass) of substance and the kinetic energy of the molecules of the substance.
Temperature only depends on the molecules’ kinetic energy; it is independent of mass.