The state of matter that has the most thermal energy is the gas state.
To understand why, it’s important to look at how thermal energy is related to the motion of particles in different states of matter. In solids, particles are tightly packed together and vibrate in fixed positions, which limits their movement and, consequently, their thermal energy. In liquids, particles are close together but can move past one another, allowing for greater thermal energy compared to solids. However, in gases, particles are far apart and move freely at high speeds. This high level of movement translates to a significant increase in thermal energy.
As temperature rises, the thermal energy of matter also increases. Therefore, gases, which can have much higher temperatures than solids and liquids, can store a lot more thermal energy in a larger volume due to the rapid motion and greater separation of the particles. Hence, among the three common states of matter—solid, liquid, and gas—gases hold the most thermal energy.