Do drugsl cause a flat affect?

Some. Not all drugs causs a flat affect, although some psychotropocs can. Dependent partially dose, the atypical antipsychotis are capable of this; although twhe older generation antipsychotics are more apt to produce this side effect. Antianxieyu meds, particularly the benzodiazepones, can cause this at high doses.
Some. In my experience, and much to my initial surprise, stimulants such as methylphendidate (ritalin (methylphenidate) and others) and amphetamine (dexedrine, adderall, etc.) are the most common causes of such a complaint. Fortunately, completely reversable. It can happen also with other medications; but, when treating depression and schizophrenia, can be hard to know what is the disorder and what is the medicataion.