Challenging elections to ensure they're fair and legal is hardly undermining them, but isn't what Trump is doing. He is grasping at the barest of legal straws, all the while asserting that he is right. For a good review of just how off base these lawsuits are, Legal Eagle has done a good review of them [0,1]. (Warning, long-form content with sponsorship segments.)
[0] https://www.youtube.com/watch?v=ha7iWECm_8E [1] https://www.youtube.com/watch?v=v-nblE8ps2M