This article will show you how to update or change your iPhone's lock screen password or passcode, as well as what to do if you've forgotten your passcode.
How to Change the Passcode on Your iPhone, iPad, or iPod touch | Apple Support
When you first set up your iPhone, you’ll need to create a lock screen password in order to unlock your iPhone using a method other than Touch ID or Face ID. However, you can choose to change it later. Here’s how to change it.
Tap Settings on your iPhone.
Enter your existing access code.