There's all sorts of interesting constitutional and legal issues if the presidential candidate is elected, but dies before inauguration. Better yet, if the candidate is elected but dies before the electoral college vote, it would be the biggest legal shitstorm America has ever seen. It's extremely unclear what would happen. Electors are bound, sometimes by state law and sometimes just by custom, to vote for the winning slate, i.e, the winner of the state vote for the candidates for president and vice-president. What happens if the presidential candidate on the winning slate is dead? Are the electors still bound to vote for that slate? Are they able to vote for the vice-presidential candidate instead? Or does casting a vote for anyone other than the official (now-dead) presidential candidate invalidate their vote? Or are the electors now effectively free agents, able to freely vote for whomever they wish? Maybe. Maybe not. No one knows. It's possible the whole thing would be thrown to the House of Representatives to decide. If that happens, the House chooses one of the top three presidential elector vote-getters as President. But, and here's a fun little thing, the Senate chooses one of the top two vice-presidential vote-getters as Vice President. That doesn't really solve things, does it? Not in our incredibly polarised political system. Not to mention that there is absolutely nothing in constitutional or electoral law that says that the House can choose a winning vice-presidential candidate to be president. As for the Senate? Well, they're bound to choose one of two candidates for VP. If the House chooses the VP candidate to be president, assuming the Supreme Court lets them (big assumption), the Senate will be bound to choose the other, losing VP candidate to be VP.
I've barely scratched the surface of what a candidate dying between the November election and the college of electors' election. There's oh so much more.