NickDiaz-9048, To better assist you on this, could you please share more details on what Azure service you're leveraging? (The website is hosted on an Azure VM? or it's an Azure App Service WebApp? Or you're leveraging Azure Communication Service for your requirement).
Typically, you would implement/have code written (OTP generation modules) similar to as you would on on-prem/or any platform, on Azure.
On Azure Communication Service, refer this doc -How to Get Started with Azure Communication Services Part 2 of 2 - Send SMS messages.
-You may take a look at this doc and discussion thread1, thread2 for some pointers.
PS. We will have to add/adjust additional tags, so you can receive insights from the targeted audience.
Thanks for additionally clarity. I'm checking on this and will get back to you shortly.
The approach that you mentioned on designing 2 App function: One app to generate OTP (store it in a database) and send it to customers using ACS. The second function App to verify the OTP from the database -is a fine method.
As for as Azure services for your requirement, you will have to use the combination/integration of two+ Azure services, just like the methodology you outlined.
Another approach is to store the users in the AAD group after verification : SMS-based user sign in for Azure Active Directory | Microsoft Learn
Please do share some more details about the requirement for further assistance.