There is no surefire way of getting this attractive woman to agree on a date. The situation does not provide the perfect atmosphere for a sudden burst of romantic endeavors. Maybe it was for the officer but not necessarily for the female.
There are conditions to be met for the officer to get lucky and get her to agree on something like giving her number, but not a date, imo. First, she also has to find him attractive. Second, in that short window of opportunity, while the officer does his job in the most professional way, asking for her license and registration, explaining to her the dangers of having a broken taillight etc., he could be witty without being creepy. Third, if she does not bite, his last resort is give her his number and hope for the best.
Unfortunately, it could be that the most successful romantic scenarios occur only in Hollywood movies. It’s not easy to be spontaneously funny and desirable that women would be willing to see you again. The officer has to create a magical moment there. That is almost impossible in that situation. So instead, he did the desperate thing that would almost guarantee a major backfire. And it did.
@john65pennington If you wish, you could watch the movie Bridesmaid with Kristen Wiig. There is a scene there that matches exactly this officer’s situation. Kristen’s character was pulled over by an officer because of a broken taillight. Watching the scene, you would immediately sense he was slowly warming up to her but the way he worked his way into her consciousness was just classy and gentlemanly. That’s one brilliant way to do it.