.NET 8 and .NET Framework 4.8 are now very different frameworks and comparing them from security standpoint makes very little sense.
.NET Framework is Windows-only and no major features are added to it. .NET Framework only receives security updates and its support lifecycle matches OS support lifecycle. These updates are received using Windows Update.
.NET x (starting with version 5 and newer) is a cross-platform framework, which can run on Windows Linux and Macs and is a unified framework that combines classic .NET Framework and cross-platform .NET Core. It is actively developed and updated (unlike classic .NET Framework) and has its own distribution/update channels and follow their own support lifecycle. In addition, .NET 8 provides support for modern ASP.NET web app frameworks, while .NET Framework implements only legacy ASP.NET MVC 5 web app framework, which is no longer updated.