You probably have a temperature switch problem. You can replace the switch, which you can buy where you got the new elements.
It is possible that the switch causing the problem is not the one that is tripping out. The one that is tripped is usually a "High limit" switch that protects the water heater if a control fails. The "high limit" switch may be part of one of the temperature switches (usually the upper) of separate, usually located with the upper.
You will need a meter to test them. You may want to replace the whole set but if you can test them you can replace the one that failed.
You need to get circuit diagrams that go with your switches so you get it right. If you get the part number from the existing switches you can Google the number and probably get the circuit diagrams.