FaceID and TouchID digital encrypted data is stored in secure enclave. However, neither the touchID sensor nor the faceID camera have any access to that secure enclave data until you first authenticate with the password.
Your screen lock passcode is never stored or saved to the device or anywhere. When first set it is used to generate the keys necessary for encryption and decryption of your data on the device and those keys are saved securely. Since the algorithm that generated the keys is based on the exact code or password you set, you need that exact code or password to verify the keys and regain access to a device. That is the added security of requiring the passcode or password - it is the master code to unlock your device and allow the operating system to begin using touchID or faceID. Since the code should be known to you and nobody else, it is the master key securing your data and device.
When your device is shut down or restarted, the keys are once again must be verified by entering the passcode and only then may touchID or faceID be used. Similarly after 48 hours of non-use, iOS itself breaks access to the keys and they must be verified anew using the passcode.
The passcode cannot be recovered since it is never saved to begin with. That is why the one and the only way to regain access to a device without the passcode or one which is disabled because of too many login attempts is to erase it and set it up all over again to generate fresh security keys.
TouchID and faceID are convenience proxy's for the passcode so you do not have to physically type it in all the time. They also allow one to use a much more complex screen lock passcode ideally since they will only need it occasionally. My password on all my devices is 12 characters including standard things like case change, numbers and special characters (it is saved in a secure keychian note on my two Macs as well as in mSecure which sync's my passwords across all my devices).
You can also change the password settings in iOS and iPadOS to include the option to erase the device after too many failed guesses at the passcode or password (8 I think it is).
So Apple has very carefully thought about all this and engineered their chips they use in their devices to be amongst the most secure consumer electronics ever made. The screen lock passcode and the way it works is integral to how secure enclave works. It is not a substitute for touchID or faceID - they are substitutes for it to make using the devices easier, and ideally to allow you to even increase security by using a complex password.