I forgot my passcode but I’m still logged in
How can I change my passcode
iPhone 6s, iOS 14
How can I change my passcode
iPhone 6s, iOS 14
Soon you will require this...
If you enter the wrong passcode on your iPhone Lock Screen too many times, an alert lets you know that your iPhone is disabled. (Learn what to do if you see "[Device] unavailable" or "Security Lockout" on your iPhone or iPad.)

Lock Screen Passcode or Screen Time Passcode.
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 ...

If you do not remember the passcode then you can't change it. You can only reset it.
Your device will require your passcode when you do the following:
I forgot my passcode but I’m still logged in