Does anxiety cause cognitive impairment?

Sometimes. Anxiety can lower one's ability to focus and concentrate, and thus can also lead to some forgetfulness or distractibility. Still, (with the exception of temporary panic attacks, if any) most anxiety usually does not impair cognitive functions as much as some other mental health difficulties. This can be improved with psychotherapy and/or medication treatments.