Energy sources and their trade-offs
Fossil fuels are stored sunlight, and every source, whether fossil, nuclear or renewable, trades emissions, waste and reliability against each other.
A worked example
A generator that takes in 20 000 J and delivers 17 000 J of useful output is 85% efficient, and the missing 3 000 J leaves as heat.
The mistake people actually make
Nuclear fission is carbon free while it runs, but it leaves long lived radioactive waste. So calling any source simply clean or dirty misses the trade-off.