How do I reset iPhone passcode after changing password?
After resetting my password I am remember my passcode how to reset my passcode having access to my iphone due to my new password?
[Re-Titled by Moderator]
iPhone 8
After resetting my password I am remember my passcode how to reset my passcode having access to my iphone due to my new password?
[Re-Titled by Moderator]
iPhone 8
Passcode
Your data is not lost if you have a backup either on iCloud or iTunes.

If you see an iPhone or iPad unavailable message or a "Security Lockout" screen
If you forgot your passcode, you can use your Apple ID and password to erase and reset your device without a computer.
Learn what to do if you see "[Device] unavailable" or "Security Lockout" on your iPhone or iPad.)

iPhone is disabled.
Following this process is the only way out if your iPhone is disabled. The steps given in this link will help you reset the passcode -> If you forgot the passcode for your iPhone, iPad, or iPod touch, or your ...

Regarding your data…

Password
Apple ID and Activation Lock
iCloud uses Apple ID credentials.
If you do not remember the Apple ID Password then follow the steps given in this Apple Article -> If you forgot your Apple ID password - Apple Support
If you do not remember the Apple ID then follow the steps given in this Apple Article -> If you forgot your Apple ID - Apple Support

If you are the owner or the owner has shared all information with you then to open Activation Lock:- If it is Activation locked, read here --> Turn off Activation Lock - Apple Support Activation Lock for iPhone, iPad, and iPod touch - Apple Support
Learn how to remove a device from a previous owner's account.
If you are not the owner and do not have the Apple ID and Password then there is no way that you can get into this iPhone unless the original owner shares the Apple ID and password with you. If you are lucky you can get into this iPhone if they (owner) accidentally remove the device from their Apple ID.

Turn off Lost Mode on an iPhone, iPad, iPod touch, or Apple Watch
Turn off Lost Mode on an iPhone, iPad, or Apple Watch
Note: If you had any cards suspended when you put your device in Lost Mode (credit or debit cards for Apple Pay, or student ID cards or Express Transit cards), when you turn off Lost Mode and sign back in to iCloud, you can use them again.
Use Lost Mode in Find Devices on iCloud.com - Apple Support
Passcode
Your data is not lost if you have a backup either on iCloud or iTunes.

If you see an iPhone or iPad unavailable message or a "Security Lockout" screen
If you forgot your passcode, you can use your Apple ID and password to erase and reset your device without a computer.
Learn what to do if you see "[Device] unavailable" or "Security Lockout" on your iPhone or iPad.)

iPhone is disabled.
Following this process is the only way out if your iPhone is disabled. The steps given in this link will help you reset the passcode -> If you forgot the passcode for your iPhone, iPad, or iPod touch, or your ...

Regarding your data…

Password
Apple ID and Activation Lock
iCloud uses Apple ID credentials.
If you do not remember the Apple ID Password then follow the steps given in this Apple Article -> If you forgot your Apple ID password - Apple Support
If you do not remember the Apple ID then follow the steps given in this Apple Article -> If you forgot your Apple ID - Apple Support

If you are the owner or the owner has shared all information with you then to open Activation Lock:- If it is Activation locked, read here --> Turn off Activation Lock - Apple Support Activation Lock for iPhone, iPad, and iPod touch - Apple Support
Learn how to remove a device from a previous owner's account.
If you are not the owner and do not have the Apple ID and Password then there is no way that you can get into this iPhone unless the original owner shares the Apple ID and password with you. If you are lucky you can get into this iPhone if they (owner) accidentally remove the device from their Apple ID.

Turn off Lost Mode on an iPhone, iPad, iPod touch, or Apple Watch
Turn off Lost Mode on an iPhone, iPad, or Apple Watch
Note: If you had any cards suspended when you put your device in Lost Mode (credit or debit cards for Apple Pay, or student ID cards or Express Transit cards), when you turn off Lost Mode and sign back in to iCloud, you can use them again.
Use Lost Mode in Find Devices on iCloud.com - Apple Support
How do I reset iPhone passcode after changing password?