Stateless Authentication, such as can be implemented with JWT, has become very popular in recent times. Your question mentions session identifiers, which are a form of stateful authentication. Basically, you authenticate somehow (by showing credentials, possibly with a second factor, etc.), and in exchange receive a session identifier. The server stores this session (e.g. creates a "state") and compares the session identifier you send to the server's active session list.
Stateless Authentication goes down a different path. Basically, the server also sends you a token, which you hold onto, and send back with every request. To the client, there is no noticeable difference in procedure: Authenticate, receive something, send this thing back.
However, where Stateless Authentication differs is how the server validates it. For example, when Alice authenticates with her password and 2FA code, the server writes
User Alice (ID: 1337) has authenticated at UNIX time 1575281516. and then signs that piece. When Alice sends that token back, the server checks if the signature is valid, and if the time of issue is not too long ago.
How is this any different?
On the surface, Stateful and Stateless Authentication seem identical, with only minute differences. But the true difference is at scale. Imagine a web-application that issues millions of users millions of different sessions. The server has to hang onto all of them.
With Stateless Authentication, the server can issue a token and immediately forget about it. There is, as the name imples, no "state" to hold onto. A token is able to validate itself. This can be quite the performance boost.
What are the problems with Stateless Authentication?
Auth0 has an article of Common Threats and How To Prevent Them, which explains issues you may encounter with Stateless Authentication. As with all technologies, it takes some time to adapt and fully understand how it works and what it can do for you.
Is Stateless Authentication better than Stateful Authentication?
Not necessarily. It's another way of doing things, with its own up- and downsides.