For the function trigger to work it needs to create a collection called leases. You can do this your self, or update the CosmosDBTrigger trigger to tell the function host it can make it if it doesn't exist
[CosmosDBTrigger(
databaseName: "database",
collectionName: "collection",
ConnectionStringSetting = "DBConn",
LeaseCollectionName = "leases",
CreateLeaseCollectionIfNotExists = true)]
You can see here for more info: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb#trigger---c-example