How do you get the user id on the front-end? I'm using Craft Pro to make a website where users have a private area. Users register and when login happens they are redirected to a page in the private area with respective info about that user.

When i use {% requireLogin %} with {{ currentUser.id }} Craft 3 outputs the ID of the user that has active login in the CP (control panel).

But what I need is the ID of the user that made login in the frontend to access private area and not user ID that is logged in CP.

I'm reading the Craft 3 docs but I didn't find the answer I'm looking for.

Any suggestions?
In Craft, there is no difference between the currently logged in user in the CP, and the currently logged in frontend user. Whenever a user logs in (be it through a frontend form, or the CP login page), it results in that user being logged in. Period. There's no 'being logged in in the frontend', as far as Craft is concerned.