Hi,
You will need to review the guidance on statutory residence at:
RDR3 Statutory Residence Test and take the statutory residence tests.
If you are tax non-resident for the whole tax year, you are taxable in the UK only on your UK income.
If you are tax resident for the whole tax year, you will need to determine if split year treatment applies, as this will determine when your world-wide foreign income becomes taxable in the UK.
In all cases, a self assessment tax return is required.
Thankyou.