From Article II, Section 2 of the Constitution of the United States of America: “[The President] shall nominate, and by and with the Advice and Consent of the Senate, shall appoint...Judges of the Supreme Court.”
That is the only thing the Constitution says about appointing judges of the Supreme Court. It does not say, for example, that the Senate must hold hearings to question the nominee. It does not establish any threshold for what constitutes a quorum or even whether a justice can be confirmed by an absolute majority or a majority of those voting or even a supermajority, which the Constitution does require for other purposes. It also does not say “but not in an election year.”
In 2016 President Obama nominated Merrick Garland. The Senate chose to withhold its advice and consent until after the election. If Trump lost, then Garland would have been appointed very quickly. This is a perfect example of “elections have consequences.” This was also completely within the Senate’s right as per Article II, Section 2.
In September 2020, President Trump nominated Amy Coney Barrett, which is completely his right under Article II, Section 2. The Senate has chosen to vote on whether to give its advice and consent for this nominee. This is completely within the Senate’s right as per Article II, Section 2.
And the late Justice Ruth Bader Ginsburg argued in 2016 that the United States Senate, when considering Supreme Court appointments, should respect that a president’s constitutional power is for “four years, not three years.”