Alexandria Ocasio-Cortez won the Democratic primary in New York City’s 14th district in a historic upset.