Hi Manako,
As you rightly note, you will be getting credits for NI whilst claiming UC which should be added to your NI record at the end of the appropriate tax year for the corresponding number of weeks of your claim.
If you stop claiming UC and do not either take up employment with earnings above the limit to pay NIC or become self-employed and pay your own NIC through Self Assessment or voluntarily, you may have a NIC deficiency at the end of the tax year.
If you are living but not working in UK and wish to pay Voluntary NICs going forward, you may set up a Direct Debit payment plan.
You can find more information about paying voluntary NICs at www.gov.uk, but you may wish to get a Pension Forecast first to make sure that paying voluntarily will benefit your State Pension position.
Voluntary National Insurance
HMRC would always encourage customers to do this before making any voluntary NIC payments.
You can check your State Pension position here:
Check your State Pension forecast
Thank you.