I have an ASP.NET Core website, using EFCore. I would like to do some work like logging to the database, but after having sent the response to the user in order to answer faster
There's no out of the box way to do what you want.
But, here's a possible approach:
Since the worked runs somewhere else and not on the request thread, the server can complete the request thread and the worker can do what's left.