How did the wave equation generalize , and how does it incorporate a restoring force?
I wouldn’t say that the wave equation exactly “generalizes” the Hooke’s law equation. It’s more that it’s another example of a similar, slightly more complex situation, for which displacement is a function of both and (rather than the Hooke’s law case for which displacement is a function of time only). The specific restoring force can be tension in a string (see derivations referred to above), or pressure in a gas, and comes in to the constant in the equation.