The iPhone has Face ID or Touch ID, but there could be times the passcode is needed, and if it's forgotten, Apple might lock access if there are too many failed attempts at guessing the correct code. While this might be a scary and frustrating experience, it can be resolved given some time and patience.
Apple has always taken iPhone security seriously since it's a portable collection of all of the user's most important contacts, logins, and payment methods. In the past, a lost passcode required
Read more on screenrant.com