How soon should I contact a lawyer?

As early as possible. Arrests, protective orders, CPS contact, and pre-charge investigations are all situations where early guidance can prevent mistakes and preserve options.