Worst case, your main bus bar got burned and that's a bit more trouble to fix. After time, especially with high current devices, the connection between the breaker and the bus bar can get hot as the spring tension of the breaker's contacts gets weaker. Note that if the supply wiring on the breaker isn't torqued properly, over time, the clamping screw may get loose...that can create a slight resistance, and cause things to get hot, creating a smell that is characteristic.
Pop the breaker out and look. Have a new one to replace it.
Double-check the specs on the new WH to verify what supply current it requires. You may have selected one that requires more current and it's taxing the existing breaker...not enough to trip it, but closer to max, and if the spring tension on the breaker is weak, or there's any corrosion there, it can start to overheat.