I need to unlock my sim and only have 1 attempt left
if you mean your PUK code
Log in to your Virgin Media Mobile account > there are a row of "tabs" near the top of the page.
Look for the 'Plan and device' tab, click on it > you'll find your code on that page.
If you want to say thanks > click 'Kudos'.Answered your question? > click 'Mark as Helpful Answer' also.
Did you set a PIN to lock your SIM in case of theft?
There is also a PUK2 code but that is not used much these days