Shower on Shabbat or Yom Tov

Had an incident on shabbat and yom tov where my little one came to my bed in middle of the night. After an hour he had an accident on me and in my bed in middle of the night. At 3am I took a quick freezing cold shower to clean myself with the baby. Would i have been allowed to turn on the hot water to make it warm or hot or would this be prohibited.

On Shabbat, cold water only. No hot water.

On yom tov, you can take a hot shower.

Does it make a difference what sort of heater you have? I.e. Solar energy (dud Shemesh) or regular boiler but it has been turned off before Shabbat?

Thanks very much as always!