Prob a dumb question and still searching the admin and user manuals.
But as a quick guide just installed the app on a iphone and being prompted for 2x passcodes.
I know no more
PS the admin manual has a broken link https://docs.nextcloud.com/ios/
Do you have run two factor auth?
I am late …
The passcodes are used only on your iOS device to encrypt files.
Encrypted files are stored in your cloud but you are not able to decrypt them using webinterface or desktop client. Only your iOS devices are able to decrypt them using the passcode.
If your passcodes are lost, you lost your data. You cannot recover or newly retrieve to codes.
The two factor auth is unrelated to iOS passcodes.