To rain on someone's parade:
means to spoil someone's good mood or excitement by bringing up bad news or negative information, essentially ruining their moment of celebration or happiness. Example: "I don't mean to rain on your parade, but I don't think this plan will work."
To throw cold water on:
This means discouraging or dampening someone's excitement.
Example: "She was so excited about her new project, but he threw cold water on it by pointing out all the challenges."
The below idiom(s)/expression(s) are still correct, but they are mostly used in other contexts.
to put a damper on:
to make (something) less strong, active, or exciting
as in "His bad mood put a damper on the celebration."
to take/knock the wind out of one's sails,
to knock the wind out of one:
means to cause someone to lose confidence or energy. Example: The team's star player was injured and it really took the wind out of their sails.