Thermal energy is the part of the internal energy of a system that is transferred between systems at different temperatures. Unlike heat, thermal energy is a property of a system or body.
Thermal energy consists of a part of the potential and a part of the kinetic energy of the system.
When the temperature of a system increases, the system gains thermal energy and accordingly, internal energy.
However, the temperature does not fully determine the amount of thermal energy contained within a body.
Temperature is a measure of the average kinetic energy possessed by the particles in a system. It therefore does not take into account the potential energy component of thermal energy.
Thermal energy, like internal energy, is a sum of energies and is dependent on the mass and composition of the body in question.
A large mass has a greater thermal energy than a small mass even though they might be at the same temperature.