It doesn't make any difference to storage used unless you permanently delete them --> Delete messages and attachments in Messages on iPhone - Apple Support
- "Deleted messages and attachments remain in your Recently Deleted folder for up to 30 days, and you can recover them." If you want to free up the storage immediately, permanently delete them. Until the 30 days are up the messages are still in iCloud, just in a special area until they are removed automatically after 30 days. This is so you can recover them should you so wish.
Permanently remove recently deleted messages and attachments
Deleted messages and attachments remain in the Recently Deleted folder for 30 days, but you can permanently remove them before that.
- Go to the Messages app
on your iPhone. - Tap
at the top of the conversation list, then tap Recently Deleted. - Select the conversations whose messages you want to delete permanently, tap
, then tap Delete. - Important: This can’t be undone.