We won the popular vote.
There are a lot of messes to clean up, to be absolutely sure, but we're on the right side of the issues (not just morally, in terms of polling) and on the right side of demographics. We lost because the majority is unfocused while the minority is desperate to cling to their power and status and throwing out all sorts of dirty tricks to keep us down.
Think about this: conservatives are literally dying off faster than they can be replaced. Their control looks stronger and deeper than it actually is, but tools like gerrymandering are designed to spread your power like an occupying army: where the Democrats would win, you cram them into ghettos to create super-blue districts, but many of these "safe" GOP districts still have a lot of Democrats in them, and all it takes is a few thousand people in a state-senate district, or a few ten-thousands of people in a federal congressional district, to turn things around. This creates something similar to the psychological bias that leads people to think that dictators are unreachably popular, when in reality their public support was very low and they were just spreading out their resources to make it look like they had strong nationwide support. That's where the GOP is right now: they get and deserve credit for playing the game better, for figuring out how to maximize the impact of their voters and minimize the impact of Democratic voters, but like Napoleon or Hitler, you have to spread your resources out pretty far to conquer all of that territory, and then suddenly something goes wrong and it all comes crashing down because you didn't really have the numbers to control that territory forever.
Or take a less wordy scenario: if everyone kept their presidential party vote the same in Wisconsin in 2020, Trump would lose, because enough of his 2016 voters would be dead (or so mentally degraded as to no longer be eligible voters) even assuming nobody new registers to vote in 4 years time, where the picture becomes bleaker still.
There are three paths forward for the GOP:
1) Use their massive buffer to start making changes towards appealing to young and minority voters right now. If they piss off the base, they can afford to take a few electoral hits because of how strong they are at the moment.
2) Try to make whites vote R at the same rate Hispanics vote D. If they can figure out how to get 75% of white people to vote Republican (up from, like, the low 60s right now), then they'll lock in an advantage until the middle of the century, but that means figuring out how to make inroads among otherwise-progressive urban whites.
3) Figure out how to disenfranchise more people faster.