go to Settings > [YOUR NAME] > iCloud and tap Messages. Now disable Use on this iPhone. This will remove your text messages ...
and iCloud. To review how much space iMessage is taking up on your iPhone, go to Settings > General > iPhone Storage > Messages. If you haven’t cleared up unnecessary attachments in a long time ...