Have you tried rebooting the phone to see if you can restart the message centre?
For info the message centre numbers are
Pay Monthly +447802000332
Pay & Go +447802092035
and you can input them manually.
The other thing to check is Wifi calling. If you have it and it's turned on, then turn it off and see if that has any effect on your text messages. (It shouldn't affect it but it's worth a try)
Finally, you may need a new sim. You can pick one up instore or by calling O2 on any of the numbers in this guide Guide: Coronavirus Community Help and Support
*The Game Is On*
If you need to change the message centre number, follow this guide:
Enter *#5005*7672#, then tap Call.
The current SMSC setting is shown on the screen. Tap Dismiss.
If the SMSC number needs changing, enter **5005*7672*SMSCNUMBER#, (where SMSCNUMBER is replaced with the correct SMSC number in full international format).
Track usage, upgrade and get support with the My O2 appDownload My O2