You will need to apply for your national insurance number online, through the GOV.uk website. Make sure that you have access to the internet and your identification (ie: passport) ready. If you do not have the correct identification, you will be asked to go in person for an appointment to prove your identity.
https://www.apply-national-insurance-number.service.gov.uk/apply/applied-before