In case you want to serve some files on the filesystem, always specify a virtual path for it, so as not to interfere with your controllers.
Areas are a handy way to structure your contents. They are particularly useful in big ASP.NET Core projects.
To combine the normal way of static files, directory browsing and default documents, you can just call UseFileServer
instead of the three other methods.
Beware of unwanted file downloads, as it's not easy to apply security to them.
Resource files can be quite useful, as we do not need to distribute the files separately from the assembly, and can use the same versioning as the rest of the code. They are definitely worth considering.
Use URL rewriting when you do not wish to expose the inner structure of your site or when you wish to comply to an externally-defined URL.
Use hosted services to spawn background services automatically and have them linked to the application's lifetime.