You need to get your PAC from giffgaff by calling 43431 then follow the details here for switching from another network to o2
http://www.o2.co.uk/help/phones-sims-and-devices/how-to-keep-your-mobile-number
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)