Electric water heater overheating very quickly
If the water heater has never been flushed and is rather old, there could be severe deposits built up inside the tank at the bottom, partly insulating the bottom sidewall where the lower thermostat is meant to sense the temperature.  You might be able to compensate for this somewhat by turning down the lower thermostat to a much lower setting.  "Popping" noises are common when a water heater is full of mineral deposits and corrosion from a spent sacrificial anode.  Look for the UL label that shows the unit's date of manufacture.  If it is 10+ years old, then it is very likely at its End of Life.  It is doubtful replacing the heating elements will make much difference.