

The energy math doesn’t make sense for grid scale applications with solid objects.
However if you can get water between two places it can work quite well. You need to live close to a big change in altitude and do a bit of geoengineering to create the upper and lower reservoirs, which can be destructive to local ecology, but not as much as a dam.
https://en.m.wikipedia.org/wiki/Pumped-storage_hydroelectricity
You can also use pumped air underwater with higher energy losses than pumped storage hydro because of compatibility of air.
Classic!
https://youtu.be/vaAF_GAc3Mk