Authentication flow of app using (navigation graph) based on Navigation component.
Here is the google documentation for implement this https://developer.android.com/guide/navigation/navigation-getting-started
For better understanding by video checkout this link https://www.youtube.com/watch?v=IEO2X5OU3MY&t=2776s