Iphone deletes messages automatically
Hello,
I had iPhone 5 for a few years, and one day, it just stopped getting text messages (both regular and Imessages). I mean that I didn't get any banner, and saw the message just when I entered the messages box. The serious problem was that every time I closed the app and entered again, the text box was COMPLETELY empty. many people tried to solve this problem, and of course, it's not a problem in the setting- I checked hundred times that the iPhone is on "keeps messages forever". I searched all over the internet and tried everything: resetting all setting, resetting network setting, changing a SIM card, updating softwares (currently have iOS 12) and even opening a new Apple ID account. Nothing worked and I thought it was probably a bug in the device.
A few weeks ago I purchased a new iPhone X. I was sure the problem would be solved, but I was shocked to find out that I have exactly the same problem. Nobody who saw this knows the problem, and everybody says it's a bug. I don't think it makes any sense that I have exactly the same bug in both phones, but I don't know where the problem is and can't fix it. This is super frustrating.
Did anyone heard of such a thing or have an idea? please help me