Hi,
You would need to review the guidance on statutory residence RDR3 and take the residence test to determine your residence status.
RDR3 Statutory Residence Test
If you are tax non resident for the whole tax year, then your pension from the IOM in the period you were not resident in the UK is not taxable in the UK and should not be included in your Self Assessment Tax Return.
If you are tax resident for the whole tax year, you then need to look at split year treatment. If split year treatment applies, you only declare your IOM pension from the date you arrived in the UK.
If it does not apply, you declare your IOM pension for the whole tax year and claim a tax credit against any foreign tax paid on the pension.
Thank you.