Pumped hydro is usually considered the best way to do this. Basically, you pump water from the bottom of the dam back up to the top. This is great because you probably already wanted most of the infrastructure for hydroelectric power; the pumps are a
relatively inexpensive addition once you have that. There are other techniques, but pumped hydro is generally what you'll see for this reason.
Flywheels are also pretty good short term, but supercapacitors mostly do their job better these days. That said they are competitive, and technological changes could nudge them into more use. Just making your wind turbine really large gives a flywheel effect, e.g., so again if you already have a spinning thing they are often worth it.