Taxes fund some public spending.
The Institute of Fiscal Studies provides a breakdown of spending - here:
ifs.org.uk/taxlab/taxlab-key-questions/what-does-government-spend-money
For 2023/23, by far the biggest costs were health, social security (pensions) and social security (working age and children) and education, accounting for over 50% of Total Managed Expenditure TME).
The various means by which tax is raised is explained here:
ifs.org.uk/taxlab/taxlab-key-questions/where-does-government-get-its-money
In 2023–24, total UK government revenue is forecast to be £1.06 trillion, or 41% of gross domestic product (GDP). The primary source of revenue is taxation, which is forecast to raise £950 billion in 2023–24, or 37% of GDP – equivalent to around £17,200 for each adult living in the UK.
That isn’t just coming from direct taxation but all the other taxes we pay. Alcohol duty, airport duty, betting levies, insurance premium tax are just a few examples
If spending exceeds income, the difference in the deficit that has to be borrowed. This adds to the National Debt currently standing at around £2.5 trillion.
The government borrows money by selling financial products called bonds. A bond is a promise to pay money in the future. Most require the borrower to make regular interest payments over the bond's lifetime. (Premium Bonds are exactly that. The amount of money PB holders have lent to the government makes up around 5% of the National Debt - that is pays interest on in the form of prizes.)
UK government bonds are known as gilts. They are normally considered very safe, with little risk that the money will not be repaid. Gilts are mainly bought by financial institutions in the UK and abroad, such as pension funds, investment funds, banks and insurance companies.
The Bank of England has also bought hundreds of billions of pounds' worth of government bonds in the past to support the economy, through a process called quantitative easing, a mechanism used to control interest rates.
Although bonds are considered safe they are traded on the stock market like any other commodity. Market values rise and fall. It’s why Kwarteng’s wreckless 2022 Autumn Budget brought pension funds to the brink of collapse and why unfunded tax cuts are so dangerous. It was only the intervention of the Bank of England which stepped in to buy bonds that saved pension funds from collapse.
Up to that point, the OBR forecast had estimated that net debt interest would cost £29 billion for 2023/24. Thanks to Kwarteng, it now expects that to be £82 billion.
There are three ways to fund that. More borrowing, raising taxes or cutting public expendure. However, the government has set fiscal rules to reduce borrowing so the choice boils down to raising taxes or cutting public expenditure.