The short answer is no, a President cannot serve 10 years.
According to the 22nd Amendment of the United States Constitution, a President can serve a maximum of two terms in office, each term lasting four years. This means that a President can serve a total of eight years in office. The 22nd Amendment was ratified in 1951, in response to President Franklin D. Roosevelt’s unprecedented four-term presidency, which lasted from 1933 until his death in 1945.

Prior to the ratification of the 22nd Amendment, there was no limit on the number of terms a President could serve. However, it was customary for Presidents to serve no more than two terms, in keeping with the example set by the nation’s first President, George Washington.
The idea behind the term limits imposed by the 22nd Amendment is to prevent any one individual from holding too much power for too long, and to ensure a regular turnover of leadership. This is seen as a fundamental principle of democracy, as it prevents the accumulation of power by any one person or group.
While the 22nd Amendment restricts a President to serving no more than two terms, it does not prevent a President from serving a total of ten years in office. This is because if a Vice President assumes the Presidency part-way through a term, they can serve for up to two additional terms of their own. This means that if a President were to die, resign, or be removed from office, their Vice President would assume the Presidency and could serve for up to ten years if they were elected to two full terms of their own.
There is a historical precedent for a Vice President serving for more than two terms. This occurred when Vice President Lyndon B. Johnson assumed the Presidency after the assassination of President John F. Kennedy in 1963. Johnson served out the remainder of Kennedy’s term, which ended in 1965, and was then elected to a full term of his own in 1964. He was re-elected in 1968, but declined to seek another term in 1972, citing health concerns.
It is worth noting, however, that this scenario is extremely rare. In the history of the United States, only one Vice President has assumed the Presidency part-way through a term and gone on to serve for more than two terms. In most cases, when a Vice President assumes the Presidency, they serve out the remainder of the term and then run for election to a single term of their own, if they choose to do so.
In conclusion, while a President cannot serve 10 years in office, it is possible for a Vice President who assumes the Presidency part-way through a term to serve for up to ten years if they are elected to two full terms of their own. However, this scenario is extremely rare and has only occurred once in the history of the United States. The 22nd Amendment, which limits a President to serving no more than two terms, is intended to prevent any one individual from holding too much power for too long and to ensure a regular turnover of leadership, which is seen as a fundamental principle of democracy.