I've read some articles that tend to say that app store downloaded apps on a non-jailbroken iPhone can't read SMS messages, which seems to be confirmed by the fact there's no "messages access" category under settings>privacy.
However, I remember that some apps sending OTP through SMS can automatically detect reception of the SMS and pull the OTP without intervention. There are also some apps that claim they can spy on a phone text messages.
So I have a doubt, and I would appreciate your input on this.