Hi,
You will need to complete a tax return up to the tax year that you finish self employment, if this is the only reason you complete a return.
Any pension you take will automatically be taxed, after any tax free lump sum.
Any losses you have from self employment and the set off against other income, depends on whether you are cash basis or traditional accounting. You can see guidance here:
HS227 Losses (2023)
Thank you.