Trump actually got less votes the second time than he did the first time. Voter turnout in the US is miniscule, with less than half the population voting for a variety of reasons (gerrymandering, voting day is not a federal holiday so people still have to work, the lack of politicians who do what they promise, etc.).
So roughly a quarter of the country voted for him, and some of them voted for him because he isn't a Democrat. There's a great story about how a trans person who ran on a defund the police campaign got elected county sheriff in Vermont because she ran as the Republican candidate. Enough people showed up and voted for whoever had the R next to their name without ever listening to any of the candidates to know what their stances were that she won by a landslide.