What information does it refer to? If it is thoroughly cleaned, it is enough to restore the factory settings.
Open phone settings, select General, and then select Restore.
If you just delete the SMS, the photo data will be deleted directly, and the recycle bin in the album will also be deleted. Then log in to cloud hosting, and delete if there is one.