The annual allowance is how much tax relief is allowed each year, you cannot put £1million into a pension and get income tax relief on that entire sum. There is a limit.
Before 2023 that was 100% of your earned income up to a maximum of £40,000 and from 2023 up to £60,000.
However the amount “used” by the Teachers’ Pension Scheme is not the amount you “add” to the pension via your contributions, nor the amount added by your employer. This is because our type of scheme, a defined benefit scheme, is valued differently.
I explain this valuation process here: https://youtu.be/kUACUCF3hsY
If you exceed the allowance then you are allowed to cover that excess by carrying forward unused allowances from the preceding 3 years, but if that doesn’t cover all of the excess then a tax charge will be payable to HMRC. You can get the TPS to pay that charge for you but it will reduce your pension as a result.
I explain this “Scheme Pays” option here: https://youtu.be/yznVVdq9deU