If you have taken out a loan in your business, you will need to set up a new code for it in Xero. It is always best to have a code for each loan you have taken out to enable you to monitor the balance correctly each year.
For your loan repayments you will need to ensure your interest is posted separately to the repayments so that the interest is classed as an expense, and the capital repayment is posted to the loan. This can be posted as a Year End adjustment. Make sure you give your accountant the loan statement each year if you’d like them balance it!