Trump spent his last days in office seeking ways to challenge the outcome of the election, culminating in a riot at the Capitol and an unprecedented second impeachment.