Impeachment
From Article II Section 4:
The President, Vice President and all Civil Officers of the United States, shall be removed from Office on Impeachment for and Conviction of, Treason, Bribery, or other high Crimes and Misdemeanors.
"High crimes and misdemeanors" is a legal term of art understood more broadly than literal crimes and misdemeanors.
Feldman, a legal historian of serious stripes, explained that the phrase was a British expression. The “high” is meant to modify both the word “crimes” and the word “misdemeanors,” and does not, as is often assumed, relate to the seriousness of an offense – but rather to the nature of the offense. “High” meant “governmental” or “official,” as opposed to “personal” or ‘private.” “Crimes and misdemeanors” according to Feldman, also doesn’t mean what we think it means. For starters, they aren’t two different things. The modern definition of “misdemeanor” may imply wrongdoing of minimal seriousness, but no such distinction existed at the time of the Constitutional Convention. Why use two words when one would have sufficed? Feldman’s take is that the framers were simply “trying to sound fancy.” But the crux of Feldman’s argument was that the very concept of “crimes and misdemeanors” does not mean violation of actual criminal statutes. Instead, this phrase relates to any action “performed in an official capacity by a government official that violates the basic principles of government.” (From an article summarizing Noah Feldman's analysis of this clause.)
25th Amendment
Section 4:
Whenever the Vice President and a majority of either the principal officers of the executive departments or of such other body as Congress may by law provide, transmit to the President pro tempore of the Senate and the Speaker of the House of Representatives their written declaration that the President is unable to discharge the powers and duties of his office, the Vice President shall immediately assume the powers and duties of the office as Acting President.
Statutes
Congress could make it a crime to do certain things that a President is doing or not doing that they believe are detrimental to national security, although their sphere of power to legislate is limited, and can't touch many aspects relating to national security.
For example, they could compel the White House to maintain and publish visitor logs. (Eg. H.R.1711 - MAR-A-LAGO Act)
Neither impeachment nor the 25th Amendment has ever been used to remove a President from power.