Kinetic energy is the main cause on which both temperature and thermal energy are dependent.
Step-by-step explanation:
Both the temperature and the thermal energy are physical quantities. Both temperature and thermal energy are having thermodynamic state function. Both of them are measurable in nature that is quantitative . Both of them do not have any direction that is they are scalar quantities.
Temperature is not dependent on the quantity of a substance but in case of thermal energy it is dependent on the quantity of a substance. Temperature is based on the average kinetic energy of given particles but in case of thermal energy it is based on the total kinetic energy of given particles.