what would the cop have needed to do differently for this stop and bust to be on firmer constitutional grounds?
There is nothing they could do to make this legal, because the original excuse for looking her up on Flock was that she had California plates.
Driving with California plates isn't probable cause for a search.
> “The Court finds that because the ALPR systems Alaniz used to search Kyle’s historical location information intruded on her reasonable expectation of privacy in the whole of her physical movements, it was a search under the Fourth Amendment. Based on the information in the record, the only reason Alaniz conducted that search was because he saw her license plate was from California. That search was not supported by probable cause, and it was done without a warrant in violation of Kyle’s Fourth Amendment rights.”
If the cop had obtained a warrant before searching ALPR data, then the search would have been legal under this judge's standard. But the cop (a) didn't obtain that warrant, (b) probably couldn't have obtained it quickly enough to decide whether to follow her until she committed a traffic violation, and (c) probably couldn't have at all since he didn't have probable cause. The question of what level of ALPR search requires a warrant is evolving rapidly now, in response to both case law and new legislation (e.g. Connecticut SB397).
Kyle also disputes whether the ALPR search found anything that justified the detention. If the ALPR search was itself illegal then that's irrelevant though.