When a text message is received, a tone is sounded and a short preview of the message is displayed on the phone's lock screen; VoiceOver announces that you have a message and will probably speak it in full. If you miss it first time, explore the lock screen with your finger by sliding your finger up and down the screen to locate the message and it will be spoken when you lift your finger. If the screen has already locked then click the side or top button to display the lock screen again and then explore the screen with your finger to locate the text message. If you want to reply to the message, slide your finger to locate the message and then double tap anywhere on the screen, the messages app will be launched and you'll be taken to a text field where you can enter a reply. Then locate the Send button a little above the top right corner of the on-screen keyboard, lift your finger and double tap to send your reply. (You may be asked to unlock your phone either with Face ID, Touch I D or a passcode before you can enter your reply.)
If the message no longer displays on the lock screen, you can use the Messages app where you can read and reply to all your messages. You can also delete messages that are no longer required in the Messages app. See all you need to know about messages with VoiceOver.
If you prefer not to have messages displayed and spoken on the lock screen one solution is to go to Settings / Notifications / Show Previews and change the setting to Never or When Unlocked. This sets the default behaviour for all apps. The preview shows a few lines of messages but VoiceOver generally speaks the entire message. If you turn off lock screen previews, you will still receive notifications informing you that you have received a message but the message itself will not be displayed or spoken. You can also turn off lock screen notifications completely for individual apps in Settings / Notifications using the list of apps in that setting.