Is this a Screen Time passcode? When you set a Screen Time Passcode, you are asked to enter your Apple ID/Password in case you forget the passcode and if you skip this, then you will receive another message that asks you "Are You Sure". This is your last chance to enter your Apple ID/Password in order to easily reset the screen time passcode. If you did use this option then this Support Article gives the steps needed to reset it, and if you did not, there is a link to contact Apple directly on the bottom on the screen.
If you forgot your Screen Time passcode - Apple Support