Nuclear (fission) energy did not originate in our sun, it originated in some other sun a long time ago, or potentially a neutron star merger.
Tidal energy originates from gravitational collapse and the conservation of angular momentum when our planet and moon formed, and does not rely on our sun, but similarly originated in the dust clouds that formed our solar system which were put there by some other sun.
Geothermal is a hybrid of these two, with some combination of nuclear decay heating and gravity-driven heating.
Hydrocarbon, wind and hydroelectric all heavily involve our sun somewhere in the process though.