How long does it take for energy generated in a star's core to typically emerge at the photosphere?

Answer

Thousands to millions of years

Due to the extreme density of the interior plasma, photons undergo a random walk, taking millennia or longer to finally reach the surface.

How long does it take for energy generated in a star's core to typically emerge at the photosphere?
lightstar