Hi
Thank you for your query.
A company is usually considered resident for tax purposes in the country in which it is incorporated.
If, however, the company carries on business in the UK through a branch or permanent establishment, it will be liable to tax on any profits from its UK trading activities.
A company is not considered to have a UK permanent establishment if its activities here are preparatory or auxiliary in character.
You can find HMRC guidance about company residence and permanent establishments at :
Company residence
and
Non-residents trading in the UK: domestic law permanent establishment/branch or agency, respectively.