For those of you not paying attention or who are from less-silly countries, the USA has a two-part spending process. First, congress passes a budget that directs how the government is going to spend money. Second, congress authorizes the government to borrow money if needed in order to fund said spending.
This, yes, means that congress first votes on whether to spend enough that we'll need to borrow money, and then votes on whether we're allowed to borrow the money that's needed for the spending they legislated.
Once congress has passed the budget, it's (essentially) a law that requires that the money be spent, so those responsible for using the money literally aren't allowed to e.g. trim programs to make sure we come in under the debt limit.