Pension - as long as you have earned income in the tax year of £4k or more, and you have not exceeded your Pension Annual Allowance for the tax year, then adding it to pension is the most optimal thing to do.
£4k to pension, as a lower rate tax payer gets £1000 of tax relief, which is added to the pension. That then all grows within the pension wrapper. When the time comes to take it out, 25% is tax free and the remainder is at your tax rate at the time. That means you may be able to take out up to £16,760 from pension without paying Income Tax. (25% tax free, remainder using £12750 of personal tax allowance). Investment will go up and down.
Due to your age, you could pay into a pension and then take the money back out again. This used to be called an Immediate Vesting Personal Pension. Withdrawing from a pension can trigger the Money Purchase Annual Allowance, but from 6th April 2023 that allowance is £10k so may not be a concern.
Stocks & Shares ISA - £4k invested, no tax relief but also no tax on withdrawal. Can be withdrawn at anytime. The value of the investment will go up and down.
If you need the money relatively soon, then a Rainy Day saver or a Fixed Rate 1yr Bond can be good. NS&I has a 1yr bond (Issue 70) at 4%, Cynergy has a 1yr bond at 4.45%, as an example. Keep in mind that cash savings lose to inflation, so in real terms you are making a loss whilst we have inflation at 10.4% (ONS, CPI Annual Rate, Feb 2023). Check the limitations on accounts. Rainy Day saver products tend to have a maximum limit. Regular Savers have a max per month that can be paid in. Fixed Rate 1yr Bonds have restricted access - no access within the fixed period. Sometimes you can find accounts which allow a small number of withdrawals a year.