You may get better and prompt responses if you may kindly provide the iPhone Model that you have and the iOS version if it is known to you and re-post.

If you have iCloud Messages enabled on multiple devices using the same Apple ID, messages are typically synchronized across all those devices. This means that if you delete a message on one device, it will be deleted from all devices where iCloud Messages is enabled.
Here's how iCloud Messages works in this context:
- When iCloud Messages is turned on, your iMessages and text messages are stored in your iCloud account instead of just on a specific device. This allows for synchronization across all devices signed in with the same Apple ID.
- When you delete a message on one device, it sends a deletion signal to iCloud, which then propagates the deletion to all your other devices. So, if you delete a message on your iPhone, it should also disappear from your iPad and Mac if they are using the same Apple ID and have iCloud Messages enabled.
- Poor network connectivity or a weak Wi-Fi or cellular signal can sometimes lead to messages not displaying correctly. This can cause messages to appear or disappear until the network connection stabilizes.
Here are some additional things you can try to fix the issue:
- Restart your iPhone.
- Check your network connection.
- Make sure you are using the latest version of iOS.
- Reset your network settings.