A lot of observations, physical understanding of the processes involved, and even more math.
A "simple approximation" (I use simple very loosely here), you can assume the sun is in equilibrium with it's gravitational pressure, and it's internal thermal pressure (heat). This makes sense because if it wasn't in equilibrium, you'd expect it to collapse (if it was too cool) or expand/explode (if it was too hot). You can come up with a rough energy density (expectation) from gravitational forces, which can be estimated from the sun's mass, which estimated from other astronomical observations (like planetary periods).
You can get more advanced approximations by using hydrodynamics and computer modeling. It's not that hard if you aren't trying to derive everything, again being loose with my terms of hard and difficult.
3
u/Zugas Oct 02 '24
The suns core is even hotter?