@Su Myat Hlaing Thanks for asking question! Yes, using an Azure Blob Storage trigger for Azure Functions is a good approach to achieve real-time indexing of newly uploaded files in Azure Blob Storage with Azure Cognitive Search immediately upon upload.
With an Azure Blob Storage trigger, you can create a function that is triggered whenever a new blob is added to a specified container in your storage account. You can then use the Azure Cognitive Search SDK to add the new blob to your search index in real-time.
Check this blog- How to Automate the Indexing of files in Azure Cognitive Search
Useful doc links-
https://learn.microsoft.com/en-us/azure/search/tutorial-javascript-create-load-index?tabs=azure-cli
https://learn.microsoft.com/en-us/azure/search/samples-javascript
Hope this helps, let us know.