When an officer asks to search your car, you can clearly decline to give consent:
"Officer, I do not consent to any searches. Am I free to go?"
Consent is one recognized basis for a search under the Fourth Amendment, and courts examine whether that consent was voluntary. 1
Refusing consent removes consent as the basis for the search. It does not end the traffic stop or prevent a search supported by a warrant, probable cause, or another lawful exception. Probable cause depends on the facts available to the officer and is reviewed under Fourth Amendment standards. 2
Stay calm, keep your hands visible, and do not interfere. If the officer asks again, repeat the same words instead of arguing about the law at the roadside.