Recovering deleted text messages on Android is difficult, and the best strategy is to have Google Drive back up your phone.
Google Messages is adding a trash folder for deleted texts, bringing it in line with iMessage and other messaging apps.