Once you use the phone it will update in your MyO2 or at least allow you to register the new number and allow you to pull it into your MyO2.
Your first top up needs to be done with a voucher though.
Scroll down this link for ways to top up
https://community.o2.co.uk/t5/Pay-Monthly-Pay-and-Go/How-can-I-pay-my-bill/ba-p/1014090
I have no affiliation whatsoever with O2 or any subsidiary companies. Comments posted are entirely of my own opinion.
This is not Customer Service so we are unable to help with account specific issues.Currently using:
Pixel 7a (O2 & Lyca), One Plus 6 (Sfr), iPhone 12 Pro Max (Vodafone)