Hi,
you can assign the function a managed identity and then make sure to assign the managed identity a role which allows to restart the container instance. For simplicity you can use Contributer, but best would be a custom role which just includes Microsoft.ContainerInstance/containerGroups/restart/action permission.
As soon as this is done, you can use powershell with the command az container restart --name name-of-the-container --resource-group your-rg-name
A really similar problem was stated here: https://techcommunity.microsoft.com/t5/apps-on-azure-blog/manage-azure-resources-using-powershell-function-app-with/ba-p/3099282 - you can use this as a template and then just modify the code with the command given above.
I hope this helps.
Regards,
Andy