Republicans like President Trump, Stephen Miller and Elon Musk endorsed him ahead of New York City’s mayoral election.