It seems that your issue is similar to the post in the Stackoverflow in Japan:
Visual Studio 2022「ASP.NET Core WEB アプリ(MVC)」の初期設定について
In the answer, he says:
(1) found a similar issue in the Development Community:
Missing ASP.NET Core Web Application C# 3.0 WebApplication Template ASP.NET Core MVC
(2) tried to check SDK version according to the following document, but no response.
(3) solved the issue by editing the order of environment variables as shown below:
Hope that the above will solve your issue.