Ken Paxton, the Texas attorney general, defeated longtime Sen. John Cornyn to win the Republican primary runoff.