Hey @Zhiyuan Zhang ,
Which cookies are you referring to? It depends on which flow you're using, the EasyAuth module for example for app services utilizes cookies much more than the oauth2/oidc/implicit flows.
I suggest taking a look at chris gillium's blog regarding the easy auth module's cookies : https://cgillum.tech/category/easy-auth/
In regards to OAuth2 and OIDC, the main resources for learning about how the cookies work would be the official MSFT documentation regarding how the flows work. This can be found here : https://learn.microsoft.com/en-us/azure/active-directory/develop/authentication-scenarios
Specifically for SSO which is typically when cookies are most interesting, I suggest taking a look at the Seamless SSO deep dive and technical docs : https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sso-how-it-works
https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/what-is-single-sign-on