Hi @CrispyRat
If it's just a static web app, I would suggest using an Azure Static Web App and adding a function api directly to it; see Add an API to Azure Static Web Apps with Azure Functions I Microsoft Learn. Doesn't matter what stack you decide to use, your static site can call the API to perform the function.
Beyond that, the error message isn't much to go on, and I get think of anything that would prevent you from creating the function app. There should be some additional details in the error message of the deployment operation. I would also try deploying your function app through VS Code or CLI, see what error messages I get there.