On Android, once you've added your key to Google Wallet, your smartphone connects to your vehicle over Bluetooth and Ultra-wideband (UWB). The latter is the radio technology used in by things like Google's Find Hub and Apple's AirTags. Digital car keys can also fall back on an NFC (or Near Field Communication) connection if your Android device doesn't have one of those other radios. Your car may also use NFC to authenticate your phone when you first add your key to Google Wallet.
These methods may actually be more secure than your car's wireless fob. According to Google, "digital car keys offer enhanced security compared to key fobs, which are vulnerable to relay attacks." Relay attacks amplify the signal from a key fob so that a car can be unlocked without you or the key needing to be nearby.
Since one of the main features of UWB is the ability to determine something's precise position relative to its radio, your digital car key won't unlock anything unless your phone is physically near your car. Because the information associated with your car is stored securely on your phone, it also benefits from the same security methods that protect everything else you keep on your device, like photos or messages.