The water temperature you need to remove stains depends on the composition of the stain. Some stains respond better to cold water, and hot water may even set certain stains:
Cold water works better for blood, certain foods, beverages, and water-based paint.
Hot water is better for oily stains, and it also works for removing stains from synthetic fabrics.
The best rule for removing a stain is to start with cold water unless you know the origin of the stain and the composition of the stained fabric. If the cold water doesn’t work, then move on to the warm.