Primaries in four states on Tuesday showed a victory for a Democrat who was facing controversies and the continued strength of President Donald Trump’s endorsement.