According to
James Madison, the clause authorized Congress to spend money, but only to carry out the powers and duties specifically enumerated in the subsequent clauses of Article I, Section 8, and elsewhere in the Constitution, not to meet the seemingly infinite needs of the general welfare.
Alexander Hamilton maintained that the clause granted Congress the power to spend without limitation for the general welfare of the nation. The winner of this debate was not declared for 150 years.
. . .
In United States v. Butler, 56 S. Ct. 312, 297 U.S. 1, 80 L. Ed. 477 (1936), the U.S. Supreme Court invalidated a federal agricultural spending program because a specific congressional power over agricultural production appeared nowhere in the Constitution. According to the Court in Butler, the spending program invaded a right reserved to the states by the Tenth Amendment.
https://legal-dictionary.thefreedictionary.com/General+Welfare