Carlos Alcaraz successfully defended his Indian Wells title against Daniil Medvedev to win his first trophy since Wimbledon last year.