Phones & tablets
Maybe — if you act fast.
On an iPhone: open Messages, tap Edit in the top-left corner, then Show Recently Deleted. You'll see everything deleted in the last 30 days — tap the conversation you want, then Recover.
On a Samsung: open Messages, tap the three-dot menu, choose Trash, long-press the conversation, and tap Restore — Samsung also keeps deleted texts for 30 days.
Past 30 days, it's gone for good unless you have a backup. And one warning: this only works if the messages were on the phone — if the phone is lost or wiped, I may not be able to recover anything.