You have a National Insurance number to make sure your National Insurance contributions and tax are recorded against your name only.
If you have a biometric residence permit (BRP), you might have a National Insurance number already - it will be printed on the back of your BRP if you do.
If you do not have a National Insurance number, you must apply for one if you plan to work. You can only apply when you’re in the UK.
You may need to send documents or attend an appointment to prove your identity. When you have proven your identity, it can take up to 16 weeks to get your National Insurance number.
Apply for a National Insurance number
https://www.gov.uk/apply-national-insurance-number
You pay National Insurance contributions to qualify for certain benefits and the State Pension.
You pay mandatory National Insurance if you’re 16 or over and are either:
an employee earning above £184 a week
self-employed and making a profit of £6,515 or more a year
You may be able to pay voluntary contributions to avoid gaps in your NI contributions.
If you earn between £120 and £184 a week, your contributions are treated as having been paid to protect your National Insurance record.
As an employee your contributions are deducted from your salary before it’s paid to you. In order to pay National Insurance, you need a National Insurance number. This is your own personal account number and it never changes even if you go abroad or change your name.
https://www.which.co.uk/money/tax/tax-calculators/national-insurance-calculator-aw6yt3g6vd0g
If you’re employed, you stop paying Class 1 National Insurance when you reach the State Pension age.
If you’re self-employed you stop paying:
Class 2 National Insurance when you reach State Pension age
Class 4 National Insurance from 6 April (start of the tax year) after you reach State Pension age