This is a good step by step guide for setting up asp net Identity and Identity server for authorization and authentication.
https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity
You can also follow the official docs examples and IdentityServer4 quickstart samples on Github
https://github.com/IdentityServer/IdentityServer4.Samples