AFAIK, net5 and net9 are incompatible with each other and you can't run one on another, major versions and all that. You need netstandard to run on different versions, but it's only for libraries, you can't run a process on netstandard.

.NET 9 will absolutely load a library that was built targeting .NET 5.

For instance, GraphQL was built targeting both .NET 5 and .NET Standard 2.0, as you can see towards the top of the NuGet page: https://www.nuget.org/packages/GraphQL

.NET 9 will use the .NET 5 build, not .NET Standard 2.0. (.NET Framework 4.8.x would use .NET Standard 2.0.) Because .NET 5 > .NET Standard 2.0.

Or Automapper 14 targets only .NET 8: https://www.nuget.org/packages/AutoMapper

It runs on .NET 9 and .NET 10.

Just to pick two examples at mostly random from the top packages on NuGet.