How do the US President's and Secretary of Defense's power to deploy troops differ?
In the May 17, 2022 Late Night with Stephen Colbert clip Mark Esper's Loyalty To The Constitution Got Him Fired From The T**** Administration in a segment where he recounted several instances of people close to the US president recommending he deploy troops in non-military situations, he said:
...but then as we got closer in the final days leading up to the election, I think it was the last Friday in October I had to call my head of the National Guard in and the Chairman of the Joint Chiefs of Staff and have this private discussion and say "listen, in the days... on the election day and the days following it if you get any type of call from The White House notify me immediately so I can intercede if that's what it took to prevent anything bad from happening, if you will.
and soon after:
That's why the position of Secretary of Defense is so important; because the only two people in the United States that can deploy troops are the president, and the secretary of defense. So it was critical for me to be in that position to be the circuit breaker in case somebody wanted to do something, whether it was deploy troops to suppress protesters or deploy troops to grab a ballot box as the case may be.
Note that Esper is advertising his new book in this segment and this is a late night comedy show not a news cast, but considering the source Mark Esper's military training and background we can assume it to be at least a credible viewpoint.
So I'd like to ask:
Question: How do the US President's and Secretary of Defense's power to deploy troops differ?