Thank you for using Apple Support Communities!
I understand from your post that you backed up your previous iPhone to iCloud, but your text messages did not show up on your new iPhone 8. If you did not restore the iCloud backup from your previous iPhone and only signed into iCloud on your new iPhone 8 then you will need to restore the iCloud backup to get the text messages on to your new iPhone 8. The following article has the steps on how to restore your iCloud backup to your new iPhone 8:
Restore your iPhone, iPad, or iPod touch from a backup - Apple Support