First things first, if there's any chance you could get locked out of your phone and you need stuff on it, I highly recommend turning on iCloud backups for it and additionally enabling iCloud syncing (or some other sort of cloud saving) for anything you really need because the backups are... not perfect.
"Erase all data on this phone after 10 failed passcode attempts" is a setting, but if you get that far I don't think it makes any difference. I had that off and after what I imagine was 10 attempts the phone won't allow any more passcode attempts anyway (see above for what this looked like).
If you google stuff about erasing your phone because you forgot the password, you end up on the apple support page that tells you how to put your phone in recovery mode. But if you have "erase phone" as an option and know your icloud password you can just do that instead. There are a handful of steps you have to do when setting up your phone again before you can download an icloud backup, so don't worry about not seeing that option for a bit.
Though the icloud menu in my laptop claimed I had a backup of my phone from a few days before, the latest one I could restore from was about a day before that.
Some things weren't saved with the backup. Steam signed me out and apparently forgot I had Steam Guard set up. This is troublesome because I need Steam Guard in order to sign back in... though it seems you can fix this if you still have the same phone number. Standard Notes signed me out and appeared to have forgotten everything, but after logging back into my account I was able to restore it all. Tragically, Safari closed all my tabs (500+more in private browsing) and forgot all my history, but maintained bookmarks and site data. My advice: if you have things you want to get around to, don't leave them as tabs in Safari, it isn't safe.
Apple Wallet appeared to have lost everything but my passes reappared in it some time later. I did lose the card I had set up, though. I lost all data from Health, but my Medical ID was untouched.
Some apps that I had on my phone but which are now removed from the app store are now gone. I can see them on my home screen but can't open them. This includes Chesh, Elaho, and EAT. But not the Carcassonne app made by TheCodingMonkeys and now removed from the app store; somehow I can still download that.
Everything I had saved in iCloud was kept right up until the point I wiped the phone. That's how I got that screenshot of the lock screen! Also, neither Google Authenticator or Authy lost anything (having both been set up before the backup was taken); Steam is the only one I had trouble with.
You actually get a couple chances to use your old phone password again after resetting your phone to unlock a few things in the backup. I think this includes any passwords you have saved in iCloud, along with some of the stuff I lost.
Kubrix kept its save data. Sadly.