Google extends Messages with functionality to organize messages so that users can see certain categories by default. One of those categories concerns one-time passwords and Messages will have an option to delete them automatically after 24 hours.
Google Messages will have five categories for sorting messages: all, personal, updates, OTPs, and offers. Users can choose a category that Messages shows by default and there are buttons below the search box to instantly switch between categories.
Specifically for text messages with onetimepasswords for twofactor authentication, there is a toggle to activate the function that deletes these messages after 24 hours. OTPs are valid for a limited time and users usually do not need to keep them.
According to Android Police, Google has not yet made the new Messages features widely available and they may only be available in certain regions such as India for now. Google asks users there to ‘donate’ messages in anonymised form so that the company can improve the function.