Several things could happen. First check the shower head volume if shower’s are too quick. A new shower head puts out about 2.5 gallons a minute. Some older heads put out 5 gallons a minute. Working with the shower head would double shower length in this case. In some cases, the dip tube on the cold water inlet has broken or worn. When this happens, it creates a short loop for the water, water at the bottom half of the tank will not be used. On electric water heaters, they commonly have two heating elements that work in turns. First the top element heats up the top of the tank, then power goes to the lower element. If the lower element is out, only the top of the tank gets heated. If the top element isn’t working, there will be no hot water. Sometimes the Reset button needs to be pushed or reset. If this doesn’t get the element working, use a continuity tester to determine if the element has shorted out. Replacement of the element may be needed.