It is not so much turning heat into energy, but turning the energy that creates the heat in the first place into another form of energy.
Example; applying brakes creates friction which creates heat. instead of allowing the process of slowing a car to create heat, you have the slowing process create electricity via a generator activated when you apply the brakes. Just think energy containment because there is no free ride on energy. You cannot just put a fan out the window of a moving car and create energy to run the car, eh?
Yes, but the experiment I’m talking about involved simple conversion of heat directly into electricity. They had one terminal that was heated, and another that was not, and they were connected by a nanowire. The effect of that was to create an electric charge on the non-heated terminal. If you could take all of the waste heat from an electric engine and convert it to electricity, think how that would revolutionize the auto. No alternator. Perhaps only a very small battery large enough to start the engine. Reduced (or no) cooling system, since the conversion of heat to electricity would itself cool the engine.