Dear student.
Since warm-blooded animals have to maintain relatively high constant body temperature, they have higher metabolic rate than cold-blooded animals. To accomplish this task more oxygen is needed to be supplied to all body tissues. A four-chambered heart is much efficient to maximize this oxygen supply to body tissues by separating deoxygenated blood from oxygenated blood. In cold-blooded animal who have two or three-chambered heart mixing of oxygenated and deoxygenated blood occurs which reduce oxygen supply to the body tissues. As cold-blooded animals don’t have to maintain high constant body temperature, they don’t need the efficiency of the four-chambered heart.
Regards.