check that you created a net 8 windows form project. check your project file, it should have:
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
the target framework and UseWindowsForms are the key.
you should also not use any nuget packages that are depend on 4.* framework dlls like System.Windows.Forms.dll (version 4). this is probably your real issue.
if you need to use a component that uses System.Windows.Forms.dll, then you will need to downgrade to .net 4.8 project.