TempData is implemented by TempData providers using either cookies or session state.
By default cookies are used to store the data. But you can choose to use session based TempData providers.
1) If your system already using session then Session based TempData provider is easy to use.
2)If your app run in a server farm on multiple servers? , there's no additional configuration required to use the cookie TempData provider outside of Data Protection.
3)If small amount of data is going to be stored in tempdata then cookie is best option.
Cookie name:
AspNetCore.Mvc.CookieTempDataProvider
You can confgiure the name of cookie as below:-
services.Configure<CookieTempDataProviderOptions>(options => options.Cookie.Name = "MyTempDataCookie");
You can also write your implementation of ITempDataProvider and register that instead of default one.