Widespread gains for President-elect Donald Trump helped him carry a number of key swing states that decided the 2024 race.