Again, all answered with plot.
Except the part you oddly bolded which is entirely wrong lol. The sun doesn't have Magma so nice one. Magma is molten rock, which the sun doesn't have. It's made of plasma and molten gasses. The earth's core is not made of magma either, it's molten metals, not magma.
And actual fire can reach temperatures hotter than magma.
Magma max temp is around 2200F
Fire max temp is around 6000F (depending on the material)
Earths core (not magma) 9300F
Sun's Core (not magma) 27,000,000 F
Bit off more than you can chew it's ok