To qualify for a full State pension, you need 35 qualifying years on your NI record. For 2023/24, the normal State pension is £10,600, having benefited from a recent 10.1% uplift.
Voluntary NI contributions are paid at the current rate, but contributions for the years 2006/07 to 2016/17 paid by 31 July will be at the 2022/23 rate of £15.85 a week even though the rate has now increased to £17.45.
Only full contribution years count, so any years with weeks missing payments should be topped up first. Prioritise the years with the smallest amounts left to pay.
As a matter of urgency, if you think you have any contribution gaps back to 2006/07 you should check your State pension forecast and NI record. This can easily be done online. Voluntary contributions will not always increase your State pension, and the decision can be especially complex for anyone who was contracted out of the State pension before 2016.
Younger people may well have sufficient years remaining until retirement in which to get to 35 qualifying years, although it will still be sensible to fill partial years. After 31 July, the opportunity to fill gaps before 6 April 2017 will be lost for good.