A white dwarf may be hot but it is not generating energy, it is losing it.
A white dwarf is the remains of a star after fusion reactions have finished. The core collapse which creates a white dwarf makes it initially very hot. It can be over
100
,
000
K
.
White dwarfs emit radiation while they cool down over a very long time period. They are very small and have very low luminosity.
A star like the Sun on the other hand is constantly producing energy from fusion reactions in the core. Although the surface temperature may only be
6
,
000
K
, the core is at
14
,
000
,
000
K
and constantly producing energy. Hence the Sun is much larger and much more luminous.
Red giant stars are even cooler at less than
4
,
000
K
. They still have fusion reactions taking place in or around the core. They are very large and very much more luminous than the Sun.