Link. “DeviceCheck lets apps check certain device data that will “persist across app deletions, reinstalls, factory resets, and even device transfers between users.”
I hate that Apple gives me a refurb when they trash my device during a battery replacement.