Ocean waves are being harnessed to provide energy via new technology. According to the U.S. Energy Information Administration the estimated potential of energy from ocean waves located off of the U.S. coastlines could equal 66% (2.64 trillion KWH) of how much energy was produced in the U.S. in 2020. Wave power isn't completely new though, Huntington Beach Wharf used to use a contraption to power their lamps back in 1909.
The new technology uses floats that are attached to structures to capture the energy. One company called Eco Wave utilizes hydraulic pistons that are attached to the floaters that are moved by the waves. The pistons have biodegradable fluid in them that builds up pressure in an accumulator located on the shore. That pressure then spins a motor that powers a generator that goes into the power grid. See the process in the diagram below.