Accept the arrest in the moment and fight it afterward with an attorney. Physically resisting can turn a misdemeanor into a felony assault on a peace officer.
Resisting arrest usually comes from someone not understanding why they are being arrested. They are in an excited state, pulling or pushing away to avoid it.
If you are being placed under arrest, the better course is to accept it in the moment and fight the arrest afterward with an attorney. Do not fight it physically at the scene. A resisting arrest charge can easily become assault on a peace officer, which is a felony. Note also that it is no defense that the underlying arrest or search was unlawful, which is exactly why that argument belongs in court rather than on the roadside.
Citation: Texas Penal Code §38.03
Degree and classification: Class A misdemeanor generally; third-degree felony if a deadly weapon is used to resist.
Statutory language: A person commits an offense if he intentionally prevents or obstructs a person he knows is a peace officer from effecting an arrest, search, or transportation by using force. It is no defense that the arrest or search was unlawful.