Ideally, there is a direct connection between taxes and government spending. In practice, this is not the case. That is because we can have one without the other.
In theory, the government should get all of its money through taxation. Every year, the government should take in whatever it can in taxes and it should spend no more than that amount. If this were the case, there would be a direct connection between the two because the level of revenues gotten from taxation would determine the maximum amount that could be spent by the government.
In practice, the government does not need to limit itself to spending only what it takes in in tax revenues. This is because many people, both in the US and outside of it, are willing to lend money to the federal government. This means that the government can spend much more than it actually takes in in taxes. The government has done this for most years of the last five or six decades. It is unclear how much debt the government can afford to take on in the long term, but so far, there have been no clear and serious consequences to the government spending more than it takes in.