What is the model number of the water heater?
There are at least 3 different Rheem 40 gallon models that I could find, 3800/3800W, 4500/4500W and 5500/5500W.
Did you install it your self?
How did you test it?
Is there still water coming out of the hot water faucets even if is is cold?
Have you got an Ohmmeter and know how to use it?
If so switch off the breaker to the heater and then disconnect the power wires from the heater. - be safety aware
Connect the Ohmmeter to the heater and check if you can measure the resistance of the heater elements.
I don't know what the resistance value is but you should not measure an open circuit (OL on Ohmmeter)
If you do then both of the thermostats have opened and disconnected the heater elements. This would be very unusual unless the water temp in the tank was above the temp for either of the thermostats to turn the heater on. Either to heat the water in the lower part of the tank or the upper part
Here's a wiring diagram that may help.
Whilst it may not be for your model usually they're wired very much the same way.
Power for the lower element comes in on L2 > high temp contacts 3-4 > lower element > lower thermostat > upper thermostat operated 4-1 > high temp contacts 2-1 and out on L1.
Power for the upper element comes in on L2 > high temp contacts 3-4 > upper heating element > upper thermostat 2-1 released > high temp contacts 2-1 and out on L1.
There is only one element used at a time
If you don't know how to test electrical circuits then don't do it! Call an electrician