I have looked elsewhere for the problem I faced, but I cannot get any clue on solving the problem. Consider, based on the type of user, I want to implement different user registration page. In current D8 version, I could add fields at admin/config/people/accounts/fields. Let's say a teacher has fields like Fname, Lname, ID, Contact, and School Name whereas student has fields like Fname, Lname, Course, and Age.
If I add those mentioned fields in the user table, I won't be able to differentiate whether that is teacher or student. In that case, how do I make two different registrations, one for teacher another for student, and store them as Drupal users so that I can apply functions such as
\Drupal::currentUser->isAuthenticated() on them?