the asp.net web applications (net framework) template is for old 4.* asp.net applications and does not support .net8
there are several asp.net templates for .net8; razor page, mvc, web api, react, angular, gpc, etc. use "asp.net core" in the search box.
upgrading to .net8 depends on your code. MVC applications port typically without a lot of recoding. webform applications require a complete rewrite (typically to razor page applications). generally its easier to create a new .net core application, and add the controller and views one at a time from the old application, or convert webform page to razor page.
see:
https://learn.microsoft.com/en-us/aspnet/core/migration/proper-to-2x/?view=aspnetcore-9.0
hint: refractor all possible code to libraries, and update all libraries to .netstandard 2.0 which is supported by both old and new projects.