How it works is that the app will sort the OTPs into their own category, which will then be auto-deleted after 24 hours. Google announced that the app will use machine learning to automatically sort your messages into categories. Messages will now be classified into personal, transactions, OTPs, and offers, making your messages less hectic.  

The new Messages feature will soon roll out in India for devices running Android 8.0 or later, along with other new features in the next few weeks in English. Google reiterates that these features are optional and can be turned off under the settings menu in Messages. At the time of writing, there is no word whether it will be available in Malaysia or other regions. (Source: Gizmochina)

Google Messages Now Auto Deleting One Time Password Messages  Service Currently Limited To Users In India - 58