Depends.
If you are working with REST APIs/SPAs, practice is to use token based authentication. You can use JWT or opaque or any other the token type, you MUST carefully implement token issuing/refreshing/revoking/exploration process.
For apps like traditional web apps you can use sessions. (there is no restriction to use token based az for these apps as well)
If you really need, you can implement both of them as well, i have seen such implementations on some of the popular software products.
In summary
It Depends
There is no hard and fast rule, you can implement whatever the method that suites your requirements/expertise.
These are most exploited features in software systems so need to implement these properly and carefully, and needs to do proper security reviews.
You can use already existing Identity management and API management solutions as well.