You should be using CDS web api to interact from Azure web app or Azure function or any external platform.
It requires some steps like registering the app in AAD for authentication using clientid/secret, creating service account/application user with privileges in CDS for impersonation from app, etc. it’s explained from top to bottom in this blog.