Contrary to what people say about putting the keys on the dash (or dropping them on ground for motorcycle riders),
DON’T DO THAT!
Why not? Because it just screams to the officer, “I’VE BEEN BAD AND I’VE DONE IT BEFORE, TOO!”
It’s just dumb behavior.
Here’s what has worked for me about 6 or 7 times consecutively over the last 31 years, all on a motorcycle, once for going too slow! (No moving violations in that time and I was once pulled over after having exceeded 110 mph for a full 30 minutes in Death Valley!):
1) As soon as you see the lights behind you, turn your right indicator on and look for a SAFE place to pull over. You don’t want to put yourself or the officer in a dangerous spot of road;
2) Once you come to a stop, roll down the window and shut off the engine (and definitely the radio!). Turning on the hazard lights is optional and not required. Do NOT reach around in the car for anything. Remove sunglasses if you’re wearing them and keep your hands on the steering wheel. Do NOT get out of your car unless the officer orders you to do so and do not resist getting out if they do (but for a driving infraction, this is unlikely);
3) When the officer gets to the window, BE POLITE! Yes, I’m telling you to “respect their authori-tay!” Force yourself to be genuinely polite. If you have the slightest annoyed or antagonized attitude, you might as well hand over your credit card right then. If you have a legally carried firearm being transported in a legal manner, inform the officer. (E.g. in California, I believe that for a non-concealed carry situation (like going to a firing range) that the firearm needs to be unloaded in a locked case in the trunk of the vehicle);
4) Answer their questions but DON’T admit to having committed any infractions or crimes. And DON’T lie about stuff, either—they’ve heard all the excuses before and they have good internal lie detectors. And do NOT consent to a search of your vehicle or its contents, regardless of whether you have any contriband of any sort;
5) Be deferential but don’t apologize (never say the word “sorry” if you can help it) and don’t be obsequious, either (“Why, yes, officer, I see your point and you’re absolutely correct.” For “old” people, don’t be an Eddie Haskell.);
6) They will 99.99% ask to see your driver’s license and registration (and I think some places ask for proof of insurance?). Assuming you do have it, tell the officer where it is and that you are retrieving. Don’t make any sudden movements while doing it, don’t obscure your search for the items (like hunching over a purse or backpack). If you don’t have the documents, depending on the officer, it could be a real problem for you;
7) If you get off with a warning, THANK the officer and tell them that you will be more careful/”dial it back”/whatever;
8) If you do get a ticket, do NOT become belligerent or abusive, that might well lead to you handcuffed in the back of a patrol car or escalate to a bunch of terminal bullet holes in your body.
THAT is how you do it.
For BIPOC: you’ve probably undergone training (or at least a lesson from your parents) in how not to become a statistic, so your approach might differ from this. I’m sorry for racist and generally insensitive LEOs that you might encounter.