Hello there, GnGoddess!
Thanks for reaching out to the Apple Support Communities! We understand that you aren’t receiving notifications when your iPhone is locked. First, check to make sure that the notification settings on your iPhone are set up correctly by following the steps in this article to Use notifications on your iPhone, iPad, and iPod touch.
Is the issue only happening with the Messages notifications or with other apps as well? If the issue is only with Messages, check out the steps in this article If an app on your iPhone or iPad stops responding, closes unexpectedly, or won’t open.
Let us know the results and we can continue from there.
Take care!