In reality it is all done by the budget. Lets say the US decides to spend x amount.
The government looks at how much revenue it has from income taxes, medicare, corporate taxes ... every other form of tax yields very little.
It looks at this number and then says mmm, that number is x-y. But we need x. We have a shortfall of y. And we can't borrow any more ... unless we raise the debt ceiling. After a little brinkmanship and political posturing the government agrees to raise the debt ceiling by y and it issues treasuries to get the money. Now private investors and banks can buy this debt in a number of ways. T-bills, T-notes, T-bonds and CPI thingies that I confess I don't really understand as well. They are all types of treasuries.
The problem is, the yield on these 'investments' is at 300 year lows, and no one wants them because the FED has nailed the base rate to the floor. In fact many foreign powers are dumping US treasuries like never before. This leaves the government with only one place to go. The lender of last resort ... the Federal Reserve.
So the FED agrees to put those treasuries on its balance sheet, and it issues US dollars that pay for all the things the government wants. This is where F35 money comes from. The US puts the cost on its defense budget, and once the debt ceiling is raised, the FED prints the money and it ends up in the pockets of Lockheed Martin shareholders. Meanwhile the FED loads its balance sheet with all the treasuries that were printed when the debt ceiling rise was approved.
Now, bearing in mind the F35 is now running at $1.5 trillion or $1500 billion as a program, I really don't think there would be much issue with putting a paltry amount like $6 billion on the budget in order to get a much needed wall to keep out the despicable Mexicans. All it takes is political will. Money is not an issue.
If you are interested in how the UK does this, being a Brit I'm more familiar with our system than the US one. It is every bit as fraudulent, but for sheer comedy value, you have to look at how the EU does this. It is beyond fraud. It is downright ridiculous.