Underwater there is no air to blow over a heatsink, so we use the keel cooling loop: coolant carries heat from the hot nodes to plates in contact with the hull, and the surrounding water carries it away.
For engineers
The loop is sized for the worst-case continuous thermal load (thrusters at cruise plus compute), with the hull plate area set so the coolant never exceeds the electronics' rated junction temperature at the warmest expected water.