You probably have mixed up "internal energy"(內能) and "temperature".(溫度). They are completely different physical quantities.
The "internal energy" is the energy possessed by an object because of the kinetic energy (KE) and potential energy (PE) of its molecules. It is the KE of molecules gives rise to the :temperature" of the object. The higher the KE of molecules, the higher is the temperature.
Objects of different size or mass contain different number of molecules. Hence, the "internal energy" of an object is, in fact, the total KE and PE of ALL of its molecules.
Suppose an object (object A) contains N molecules and each molecule possesses a sum of KE & PE equal to [e] on average. The "internal energy"possessed by this objject = N.[e].
If another object (object B) has much less number of molecules, say n, but each molecule possesses higher KE & PE, say, equal to energy [E]. This object will have a higher temperature than object A, because each of its molecules has higher energy than those in object A, i.e. [E] > [e] The "internal energy" of object B is thus equal to n.[E].
Therefore, depending on the actual value of n and N, though [E] > [e], the quantity N.[e] may not be smaller than n.[E], if N >> n
An iceberg contains water molecules billion times more than water molecules in a cup of hot water. Although the energy possessed by a molecule in the hot water is higher than a molecules in an iceberg (e.g. if the water is at 100'C and the iceberg is at 0'C, the energy of a molecule in water is about 100 times the energy in a molecule in the iceberg, that's why the hot water feels hotter than the iceberg). However, there are, suppose, a billion (1,000,000,000) molecules in the iceberg. The sum of energy possessed by all these billion molecules (internal energy) is surely much higher than the total energy possessed by the small number of molecules in the hot water.