When police pull you over you should always refuse to consent to a search unless they have a warrant you do so. Consenting to a search waives your rights, and there is never a good reason to do so. For one thing, consenting to a search gives officers an opportunity to plant evidence in your vehicle. It’s not even hard to find true stories of cops behaving in this fashion.
In order for police to have a legal right to search your car without those two things, they must have probable cause.
This is your Fourth Amendment right, and you’d be surprised how often these rights get violated.