Hello there,
As it turns out, transferring your SIM card to a new iPhone will NOT bring over old text messages and/or iMessages. In order to retrieve your old messages, you would have needed to restore from an iCloud or computer backup, or you would need to have Messages in iCloud enabled.
Here’s a link to show you how to restore from a computer or iCloud backup if you have one: https://support.apple.com/en-us/HT204184
Keep in mind, if you did restore from an iCloud backup, you’ll want to make sure you are connected to Wi-Fi, as it is the best and fastest way to retrieve your data wirelessly.
Here’s a link to show you how to use Messages in iCloud: https://support.apple.com/en-us/HT208532
If your previous iPhone has already been erased, you can try contacting a data recovery center like DriveSavers and see what options and prices they have available. This can be pretty expensive, but may be a lifesaver if absolutely needed.
If you do not have a backup and no longer have access to your previous device, there won’t be a way to retrieve your messages.
Hope this helps!