When your Apple Card is created, Apple generates a device number that's specific to you and is stored on your iPhone's Secure Element — Apple's security-oriented chip for storing payment information.
If this sounds familiar, that's because Apple also uses the device number system for your other payment cards in Apple Pay as well. When you add a card to Apple Pay, a device number is created and stored on the iPhone's Secure Element chip. For privacy purposes, Apple only has access to a portion of your device number and a portion of your credit card number.
When you make a purchase through Apple Pay, your iPhone provides this device number and a one-time security code to complete the transaction — not your actual credit card number. This process works the same way when you pay with Apple Pay using your Apple Card.