It uses Bluetooth, if you have an android phone you can also use the NFC chip in the phone (if it has one) like a keycard (you have to place your phone on the reader like a key card).
The phone key may not have failed for you but it’s not 100% perfect. Have had a couple of occasions where the phone key hasn’t woken the car and therefore it wouldn’t unlock.
The solution is to just open the app to wake up the car but that works over the air. If your phone or the car does not have WiFi or mobile coverage, like in an underground car park, what will not work.
Phone key also doesn’t work if it’s dead.
Like I say, phone keys are great, but there are 1 in a million edge cases where they can leave you stuck. Carrying the card in your wallet is not a terrible idea.