Novak Djokovic defeated Daniil Medvedev in straight sets to win his fourth US Open and record 24th Grand Slam singles title.