Hi Moideen Kunju Abdul Rahim,
As you’ve advised that you were not employed overseas, then you are not able to pay voluntary class 2 contributions for your period overseas.
If you were self-employed overseas then you may however be entitled to pay voluntary class 3 contributions for your period overseas, please see attached link for more information.
Apply to pay voluntary National Insurance contributions when abroad
Thank you.