There are four ways to produce electricity: you only said it could produce electricity, but not to what extent, haha
1: Thermocouple, different metals have different energies different electronic potentials under different temperature conditions. A difference in potential. will occur, and naturally there will be an electric current. Of course, this current will be very small.
2: Semiconductor: The PN node will have the Tier effect when current passes through it, i.e. one side of the node absorbs heat and the other side releases heat the heat. The opposite effect of this effect can produce a potential difference. You can search for semiconductor refrigeration chips online. Check the relevant information.
3: Stirling machine, I won't go into details. Closer to the Carnot cycle. This is probably the most effective.
4: Rankine cycle using an organic medium: thiscase allows to obtain the best efficiency in low temperature conditions. However, it is estimated that such a small expansion screw machine that can be driven by a cup of hot water will be difficult to process.
For more details, you can check the Tibet geothermal power plant, which uses n-hexane as a medium to drive the expansion screw machine. The working heat source is 110 degree hot water and the back water temperature is 30 degree. Basically, one ton of water can produce one kilowatt hour of electricity.
I hope this is helpful.