https://en.wikipedia.org/wiki/Twenty-second_Amendment_to_the_United_States_Constitution
Section 1. No person shall be elected to the office of the President more than twice, and no person who has held the office of President, or acted as President, for more than two years of a term to which some other person was elected President shall be elected to the office of the President more than once. But this Article shall not apply to any person holding the office of President when this Article was proposed by the Congress, and shall not prevent any person who may be holding the office of President, or acting as President, during the term within which this Article becomes operative from holding the office of President or acting as President during the remainder of such term.
“No person shall be elected to the office of the President more than twice,” doesn’t say consecutively. It would take a HUUUUGE leap of logic to insert that word where it doesn’t exist. I’m sure someone will make the argument, but by the letter and the intent of the law, Trump is done after this term.
“and no person who has held the office of President, or acted as President, for more than two years of a term to which some other person was elected President shall be elected to the office of the President more than once.” If Trump has a heart attack and dies before January 20, 2027, Vance would take over and serve 2+ years as President, meaning he could only be elected once for one four-year term.
The rest of Section 1 just means anyone who was in office at the time is grandfathered into the old rules (no limits).
This is an interesting, but untested, legal theory. When Al Gore ran in 2000, there were murmurings of whether he should try to get Bill Clinton on the ticket as VP. Ultimately, there was some consensus that this part of 12th Amendment wasn’t superseded by any others: “But no person constitutionally ineligible to the office of President shall be eligible to that of Vice-President of the United States.”
It’s a bit of an open question whether that means only those parts of the eligibility requirements in place at the time (35 years old, natural born citizen, etc), or whether new requirements are also included, such as already serving two full terms as President. Clinton/Gore didn’t want to push those boundaries, but Trump certainly could try.
Edit: The 2012 book Constitutional Cliffhangers has a whole chapter dedicated to this and similar scenarios. It became a must-read in Trump’s first term, and is even more of one now.