It is a common advice, perpetuated by many parents, and even some doctors, that if you have a cold, you should avoid dairy products, because they cause phlegm to build up or thicken. See e.g. Foods that cause mucus buildup.
Do they (and if they do, how/why)?