Your iPhone can be set to delete everything after ten wrong passcode guesses, which is a great idea from a security perspective. Anyone who steals your phone can’t access your data unless they get really, really lucky.
If you’d like to enable this feature head to Settings > Touch ID/Face ID & Passcode and enable “Erase Data,” as shown above.
What if you forget your passcode? You’d need to wipe your iPhone anyway, because there’s no way to bypass a lost passcode. The only thing you gain by leaving this feature off is more time to remember your passcode, but by enabling it you make it practically impossible for anyone else to gain access by brute forcing. Back up your iPhone regularly if you’re truly worried about this.
Cr. howtogeek, it24hrs