She hasn't earned enough in those years to pay sufficient National Insurance to make them qualifying years towards state pension entitlement.
There is a minimum threshold earnings amount for each year. If you earn below that you don't pay.
The voluntary contributions are just that - voluntary. But it's advisable to pay them if you don't already have, or expect to have the 35 [current requirement] qualifying years for a full state pension.
Rates for each year are listed here:
https://www.which.co.uk/money/tax/national-insurance/national-insurance-rates-ajg9u9p48f2f