that's by the 12th Amendment. If nobody has over half (270 these days), then it goes to the House for President, and to the Senate for VP. Each state delegation gets 1 vote, thus WY is as strong as CA. It's 27-20 (with 3 states with a tie) if all goes by partyline vote in the House... with Pelosi presiding.
Watch Sens Romney, Collins, and Murkowski give us a VP Harris, "as a way to seek unity". Imagine THAT press conference, with Trump and Harris. LOL