
The first iOS 17 beta has just rolled out to developers after its announcement at WWDC 2023. While we know some of the features already, others are just being discovered, such as a new automatic delete feature for verification codes (via MacRumors).
In the Passwords section of the Settings app, there's now a "Clean Up Automatically" setting that will delete texts from the Messages app that contain 2FA codes once you've used them to log in. It relies on the iPhone's AutoFill feature (which automatically inserts user IDs and passwords when you need them) to know when they've been used, so presumably anyone who prefers to log-in manually won't be able to make use of this.