The MonoGame template package is still based on .NET Standard 2.0, and it’s not fully updated for .NET 8 yet. Because of that, the install command can fail. Trying it with .NET 6 or 7 SDK might work.
MonoGame.Templates.CSharp 3.8.4.1 on nuget