Auth advice on the internet is mostly cargo cult. "Use JWT" was the 2018 answer. "JWT is bad, use sessions" was the 2022 answer. The 2026 answer is: it depends, and probably not localStorage JWT.
Here's the actual decision framework, from someone who has shipped all three patterns in production.