Yes, it is generally not recommended to put hot pans directly into cold water. The rapid change in temperature can cause thermal shock, which can lead to warping or even cracking of the pan. This is especially true for materials such as cast iron or certain types of steel that are not designed to withstand extreme temperature changes.
When you expose a hot pan to cold water, the sudden contraction of the metal can cause it to deform or develop fractures. Additionally, the temperature difference can cause the pan's coating or seasoning (if applicable) to become damaged or flake off.
To avoid potential damage, it is best to allow your pans to cool down naturally before cleaning them. If you need to clean a hot pan quickly, you can let it cool for a few minutes, then rinse it with warm water instead of cold water. Gradual temperature changes are generally safer for cookware.