Hi @suzies As long you are using Samsung Messages can restore via the method @pete00 described. You have 30 days to restore, Google Messages though does not offer this option.
Back up options also detailed in this article https://www.androidpolice.com/how-to-retrieve-deleted-samsung-texts/
I do not work for Samsung or make Samsung Products but provide independent advice and valuable contributions.
My Device- S21 Ultra 5G ( SM-998B/DS ) CSC= BTU , 12GB/256GB
One Ui 5.0,Android 13 .