In case anybody else has the same problem I had:
I did have an Azure Functions template, but the runtime I needed (.NET 7) was not listed. Repairing Visual Studio did not fix it.
I deleted my AppData\Local\AzureFunctionsTools directory. Visual Studio recreated it, problem solved.