Article II, Section 1 specifically requires electors be appointed by each state's legislature — not its governor, court or other authority — only the state's legislature.
Article III, the judiciary, is short but immense in stature. It sets forth the constitutional remedy for violations of law and responsibility thereof. There is no doubt the U.S. Supreme Court (and other federal courts created by Congress) have this authority and responsibility to oversee federal elections and act on fraud and other irregularities on behalf of individual states and their citizens when they've been disenfranchised.
Article VI of the Constitution specifically binds legislatures, executive and officers of the United States and of the states to support the Constitution. Allegiance more specifically pledges individuals and entities to preserve, protect and defend the Constitution.
The fallout from this election hinges on these constitutional foundations and on the states' remedies of election irregularities and illegalities prior to Supreme Court adjudications.
There are three actions possible, and the court(s) will not come out unscathed. The court could make a decision(s) that upholds the certified result totals of all the states and allow a flawed election to stand. I say flawed now well-ahead of the full conclusive scope of illegal activity that will be documented — and that has been reported first-hand by numerous entities.
The court could reverse the election's current decision(s) in some states which would award the result to the president. If they do this, the detailed unlawfulness will be apparent, and the court will have some cover. This decision may cause much civil unrest.
The court could make a decision not to interfere in the states' decisions and shirk constitutional duties. That decision would alter the Supreme Courts' validity into eternity.
Individual states and institutions such as the presidency and Congress (particularly the U.S. Senate) have bona fide standing with the U.S. Supreme Court. What the courts do will determine whether this country remains a Constitutional Republic or shifts to a socialist regime. But remember this: Every federal official, judge or justice, those in Congress or serving in the executive branch, and for that matter — all who serve in government — must obey standards and allegiance to the U.S. Constitution. This isn't a decision as to whether President Trump remains in office or if Mr. Biden prevails. It is a matter of constitutional integrity and rule of law.