Hi,
You first need to consider the UK tax residency rules.
RDR3 Statutory Residence Test
As you were resident in the UK for more that 183 in the 23/24 tax year, you are tax resident for the whole tax year. As you are tax resident for the whole tax year, you need to consult the guidance on split year treatment.
You will need to consider article 14 of the UK/HK tax treaty, as it refers to employment income. You became self employed when you moved to a consultancy contract and this is covered by article 20 (other income).
As self employed and in receipt of foreign self employment income, you are required to complete a Self Assessment Tax Return.
Thank you.