The first is to use the height difference to generate electricity, commonly known as hydropower generation;
The other is to use the rise and fall of the tide to produce electricity, also known as tidal power generation;
Another method is to use seawater to generate electricity, which uses a large number of ions in sea water, coupled with a certain magnetic field, and uses the movement of ions in the magnetic field to form a potential difference (i.e. voltage) between the two plates in the water to produce electricity.