The Articles of Confederation was the first constitution for the United States, but was known for being very weak and giving little power to the federal government. Under the Articles of Confederation, the federal government could not tax the states, regulate trade, draft soldiers, or even create and enforce laws properly.
Article VIII of the Articles of Confederation calls for all costs or defense to be taken from a common treasury. This was a huge problem, simply because the government under the Articles of Confederation did not have the power to tax the states. In order to obtain money for war, defense, soldiers, or anything else, the government had to outright ask the states for money. As you can imagine, a lot of states did not want to give up money if they did not have to, so the government had a hard time raising money. Loans from foreign countries are a thing, but a lot of countries were hesitant to give loans to the United States, as they feared they would not be able to pay it back.
Eventually, the Constitutional Convention of 1787 occurred. While the original goal was just to amend the Articles of Confederation and try to fix the obvious problems that were happening, this did not happen. The Articles of Confederation ended up getting scrapped altogether and the United States Constitution was created in its place, which gave power to the federal government and fixed crucial issues that were wrong with the previous constitution.