Hi,
A company which is resident in the UK is normally subject to corporation tax on the whole of its chargeable profits on a worldwide basis (subject to relief for double taxation).
A company which is not resident in the UK is only liable to corporation tax if it carries on a trade in the UK through a permanent establishment.
A non-resident company may also be liable to UK income tax on non-trading income.
You can find HMRC guidance on company residence at:
INTM120030
Thankyou