The term “Cabinet” is never mentioned in the Constitution itself. James Madison was the first President to use the term, basing it on the British Privy Council. The Cabinet has its constitutional basis in Article 2, Section 2, which states that the President “may require the Opinion, in writing, of the principal Officer in each of the executive Departments, upon any Subject relating to the Duties of their respective Offices…” Later, it mentions these heads as some of the people that must be confirmed by the Senate.
Article II, Section II
https://constitutioncenter.org/the-constitution/articles/article-ii#article-section-2