You didn't mention what OS hosting for runtime you're using. However, I'm not certain how you were able to use an editor in the portal straight forward to create a function inside the function app. But it's a method I wouldn't advise doing. I strong suggest using VS Code or another editor.
Based off the runtime; see https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference?tabs=blob&pivots=programming-language-csharp, the hosting will for certain look for the entry point. In .NET, it checks for methods attributed with [Function]
while JavaScript/TypeScript, it checks what "main": "<path to entry point>"
is set to in package.json, and in Python, it looks in function_app.py
. The Azure Functions tooling for VS Code handles all this for you so you don't have a worry about wiring this up.