Water heater heating water as evidenced by hot water coming out T&P Relief Valve so it is NOT a heating issue.
That leaves a delivery issue
Cold water from hotside of faucets indicates:
Water heater BYPASS Valve is still OPEN so cold water flows into Hot water system (Check valve on hot out closes)
OR
You have an Atwood XT Model water heater that uses a 'MIXING Valve' to control water temp on hot water system
Water heater heats water to 160*F then cold water is mixed with it so water going into hot water system is 130*F
Hot going into Mixing Valve clogs up from scale/crud in water heater and then only COLD water flows thru Mixing Vlave
SO what Brand/Model of water heater?
Providing THAT kind of info when seeking help is beneficial to ALL
This is an Atwood with Mixing Vlave